Giter VIP home page Giter VIP logo

Comments (9)

beufanet avatar beufanet commented on August 18, 2024

Python2 ? ou Python3 ?

from linkyndle.

l0ghan avatar l0ghan commented on August 18, 2024

pi@raspberrypi:~ $ python3 --version
Python 3.5.3

from linkyndle.

djerfy avatar djerfy commented on August 18, 2024

@l0ghan ça te donne quoi si tu retourne la commande date simplement ?

J'avais eu quelques soucis similaires sur un autre projet, un lien qui peut être utile https://techblog.thescore.com/2015/11/03/timezones-in-python/

from linkyndle.

beufanet avatar beufanet commented on August 18, 2024

bug trouvé ou pas ?

from linkyndle.

l0ghan avatar l0ghan commented on August 18, 2024

non j'ai essayé de modifier le code mais tjs la meme erreur je me demande si il n,y a pas un soucis avec les "variables d'environnement" par defaut de l'image rasbian sachant que j'ai fait une reinstall ..

from linkyndle.

djerfy avatar djerfy commented on August 18, 2024

J'ai un doute sur le fait que ça vienne d'une simple variable d'environnement. Je pense soit à la version de Python, soit au timezone utilisé. Un truc assez rapide à tester si tu veux (à faire en root) :

mv /etc/localtime /etc/localtime.old
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime

from linkyndle.

l0ghan avatar l0ghan commented on August 18, 2024

Apres les modifs que tu as suggéré @djerfy :
(pour info j'avais regénéré le timezone avec le "raspi-config" aussi ca n'avait pas marché :

root@raspberrypi:/home/pi/linkyndle# python3 linkynflux.py --days=16
2019-02-10 13:36:02,956 logging in InfluxDB Server Host 192.168.0.253...
2019-02-10 13:36:02,962 logged in InfluxDB Server Host 192.168.0.253 succesfully
2019-02-10 13:36:02,963 logging in Enedis URI https://espace-client-particuliers.enedis.fr/group/espace-particuliers...
2019-02-10 13:36:03,020 Starting new HTTPS connection (1): espace-client-connexion.enedis.fr
2019-02-10 13:36:03,448 https://espace-client-connexion.enedis.fr:443 "POST /auth/UI/Login HTTP/1.1" 302 0
2019-02-10 13:36:03,469 logged in successfully!
Traceback (most recent call last):
File "linkynflux.py", line 93, in
firstTS = _getStartTS(args.days)
File "linkynflux.py", line 48, in _getStartTS
return date.astimezone(tz.tzutc()).timestamp()
ValueError: astimezone() cannot be applied to a naive datetime

from linkyndle.

beufanet avatar beufanet commented on August 18, 2024

Est ce que tu as trouvé une solution ?

from linkyndle.

l0ghan avatar l0ghan commented on August 18, 2024

non je suis parti sur une autre façon de faire du coup.
merci

from linkyndle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.