Erreur au lancement

bonjour

La box jeedom ne parvient pas à lancer le daemon du plugin dahuavto. Voici les erreurs rencontrées:

Error: importing module from jeedom folder
Traceback (most recent call last):
File "/var/www/html/plugins/dahuavto/resources/dahuavto/daemon.py", line 16, in <module>
from jeedom.jeedom import *
File "/var/www/html/plugins/dahuavto/resources/dahuavto/jeedom/jeedom.py", line 24, in <module>
import serial
ModuleNotFoundError: No module named 'serial'
Error: importing module from jeedom folder
Traceback (most recent call last):
File "/var/www/html/plugins/dahuavto/resources/dahuavto/daemon.py", line 16, in <module>
from jeedom.jeedom import *
File "/var/www/html/plugins/dahuavto/resources/dahuavto/jeedom/jeedom.py", line 24, in <module>
import serial
ModuleNotFoundError: No module named 'serial'

J’ai également relancé l’installation plusieurs fois, qui est longue à arriver à 60% puis s’arrête soudainement, avec le status ok. Pourtant le message « ModuleNotFoundError » semble indiqué que le module ne s’installe pas bien ?
merci

Bonjour,
C’est probablement un problème avec votre version de python et/ou pip et pas avec le plug-in.
Si vous cherchez cette erreur sur le forum vous trouverez plusieurs sujets similaires et la solution.

Il faudrait fournir les log des dépendances aussi + page santé.

Quelle version de l’os et de python ?

bonjour
Je n’en ai malheureusement aucune idée (il semblerait python3 dans la log ci-dessous), c’est une box jeedom zwave « de base », version 4.1.23.


  • 	      Installing dependencies		    	 *
    

Hit:1 Index of /debian-security buster/updates InRelease
Hit:3 Index of /meveric all InRelease
Hit:4 Index of /meveric buster InRelease
Hit:5 Index of /debian/ buster InRelease
Hit:6 Index of /debian/ buster-updates InRelease
Hit:7 http://www.deb-multimedia.org buster InRelease
Err:2 Index of /odroid stable InRelease
502 Bad Gateway [IP: 51.178.69.128 443]
Reading package lists…
W: Failed to fetch http://repo.jeedom.com/odroid/dists/stable/InRelease 502 Bad Gateway [IP: 51.178.69.128 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists…
Building dependency tree…
Reading state information…
python3-pip is already the newest version (18.1-5).
python3 is already the newest version (3.7.3-1).
python-requests is already the newest version (2.21.0-1).
0 upgraded, 0 newly installed, 0 to remove and 126 not upgraded.
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.21.0)
Requirement already satisfied: pyudev in /usr/local/lib/python3.7/dist-packages (0.22.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from pyudev) (1.12.0)


  • 		 Installation finished  				 *
    

Dans le menu jeedom,

  • allez dans réglages > système > configuration
  • dernier onglet « os/db »
  • bouton rouge « adminstration système »

dans la fenêtre suivante vous pouvez taper les commandes suivantes pour connaitre la version:

python --version
pip --version
pip3 --version
python3 --version

pouvez-vous lister les plugins que vous avez également (a part celui-ci)?

ce plugin n’installe pas le package serial, il n’en a peut-être pas besoin mais comme l’auteur n’a probablement pas nettoyé le code de base du plugin template, son démon tente l’import du package quand même et donc ca ne fonctionne pas sauf si un autre plugin a déjà installé ce fameux paquet :wink:
@Paul-ds, pouvez-vous confirmer ou infirmer cette hypothèse?

si c’est ca alors une solution de contournement est d’installer serial, via le même menu, cette commande devrait faire l’affaire
sudo pip3 install serial

bonjour

voici le résultat des commandes :

Python 2.7.16
pip 18.1 from /usr/lib/python2.7/dist-packages/pip (python 2.7)
pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
Python 3.7.3

voici ce que donne l’installation :

Collecting serial
Downloading https://files.pythonhosted.org/packages/1f/51/6a260c498162c37d0759f3759b7647a10d8d30caba1cfc9aa4b5b1f0d08b/serial-0.0.97-py2.py3-none-any.whl (40kB)
Collecting future>=0.17.1 (from serial)
Using cached https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz
Collecting iso8601>=0.1.12 (from serial)
Downloading https://files.pythonhosted.org/packages/c5/10/da48dc228b821a64407c2527e1e8ee98917b36e80a181f2ca06ea3cb676b/iso8601-0.1.14-py2.py3-none-any.whl
Collecting pyyaml>=3.13 (from serial)
Downloading https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz (175kB)
Installing build dependencies: started
Installing build dependencies: finished with status ‹ done ›
Building wheels for collected packages: future, pyyaml
Running setup.py bdist_wheel for future: started
Running setup.py bdist_wheel for future: finished with status ‹ error ›
Complete output from command /usr/bin/python3 -u -c « import setuptools, tokenize;file=‹ /tmp/pip-install-q161uryu/future/setup.py ›;f=getattr(tokenize, ‹ open ›, open)(file);code=f.read().replace(‹ \r\n ›, ‹ \n ›);f.close();exec(compile(code, file, ‹ exec ›)) » bdist_wheel -d /tmp/pip-wheel-wtdqq2ww --python-tag cp37:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
or: -c --help [cmd1 cmd2 …]
or: -c --help-commands
or: -c cmd --help

error: invalid command ‹ bdist_wheel ›


Failed building wheel for future
Running setup.py clean for future
Running setup.py bdist_wheel for pyyaml: started
Running setup.py bdist_wheel for pyyaml: finished with status ‹ done ›
Stored in directory: /root/.cache/pip/wheels/2a/d4/92/cf299bdf4162957ca8126b46e913e29f76a4f17ca762c45028
Successfully built pyyaml
Failed to build future
Installing collected packages: future, iso8601, pyyaml, serial
Running setup.py install for future: started
Running setup.py install for future: finished with status ‹ done ›
Successfully installed future-0.18.2 iso8601-0.1.14 pyyaml-5.4.1 serial-0.0.97

Suite à l’installation, il semble que le process démarre correctement.
merci.

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.