Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named 'requests' #4

Open
bilyboy785 opened this issue Feb 19, 2018 · 3 comments
Open

ImportError: No module named 'requests' #4

bilyboy785 opened this issue Feb 19, 2018 · 3 comments

Comments

@bilyboy785
Copy link

bilyboy785 commented Feb 19, 2018

Salut !

Petite erreur avec ton script malheureusement :

Traceback (most recent call last):
File ".//linky_json.py", line 25, in
import linky
File "/var/www/html/plugins/script/core/ressources/linky/linky.py", line 25, in
import requests
ImportError: No module named 'requests'

Autre erreur :
ImportError: No module named 'requests'
Traceback (most recent call last):
File ".//linky_json.py", line 26, in
from dateutil.relativedelta import relativedelta
ImportError: No module named dateutil.relativedelta

Egalement, j'ai vu que mon Jeedom installé sur Debian 9.3 est sur Python2.7, or tu exécute ton script en python3 par défaut.

@empierre
Copy link
Contributor

il te manque un module:
python3-requests

regarde ici:https://github.com/empierre/domoticz_linky

@Xanatos00
Copy link

le package html est propre à python 3
pour python 2.7 on peut le remplacer par HTMLParser et modifier comme suit:
if res['etat'] and res['etat']['valeur'] == 'erreur' and res['etat']['erreurText']:
raise LinkyServiceException(HTMLParser.HTMLParser().unescape(res['etat']['erreurText']))

@zesk06
Copy link

zesk06 commented Nov 27, 2018

Salut,
tu dois installer le module requests et python-dateutils

avec pip:

pip install requests python-dateutil

Tu peux voir #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants