Giter VIP home page Giter VIP logo

gazpar's People

Contributors

mexx62 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gazpar's Issues

Erreur récupération données

Bonjour,
J'ai un problème depuis quelques jours.
J'arrive à me connecter mais j'ai ça :

2020-06-11 13:26:12,596 get Data from GRDF from 08/06/2020 to 11/06/2020
Traceback (most recent call last):
  File "/config/gazpart/gazpar/gazinflux.py", line 143, in <module>
    t = datetime.datetime.strptime(d['date'] + " 12:00", '%d-%m-%Y %H:%M')
  File "/usr/local/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.7/_strptime.py", line 359, in _strptime
    (data_string, format))
ValueError: time data '0 12:00' does not match format '%d-%m-%Y %H:%M
```'

libxslt.so.1:

Hi
could it be possible to have a lool on that error and how to fix it ? ( I did it out of docker )
thanks ...

python3 gazinflux.py --days=5
......
Traceback (most recent call last):
File "gazinflux.py", line 12, in
import gazpar
File "/home/pi/gazparinflux/gazpar.py", line 29, in
from lxml import etree
ImportError: libxslt.so.1: cannot open shared object file: No such file or directory

What I have done to fix it ....
apt install python-libxslt1
and change LD_LIBRARY_PATH to include Docker Lib
LD_LIBRARY_PATH=/var/lib/docker/overlay2/*******802/diff/usr/lib:.

Docker never connects to GRDF but it works with Python directly executed on my host (without docker container)

Hello,

First of all, great job ! I tried to modify your code to also include sending data to MQTT. But when testing, I had some troubles when executing from docker. So I tried with your release (without my modification and I have the same issue).

When I launch the docker container (with the right credentials to connect to GRDF), I have the following beahviour:

2021-04-11 16:57:54,678 logging in InfluxDB Server Host 192.168.0.2...
2021-04-11 16:57:54,678 logged in InfluxDB Server Host 192.168.0.2 succesfully
2021-04-11 16:57:54,678 logging in GRDF URI https://monespace.grdf.fr/monespace/particulier...
2021-04-11 16:57:54,681 unable to login on https://monespace.grdf.fr/monespace/particulier

With the same credential and launching from python running from my host, I can connect and retreive the GRDF data.
Do you have any idea, were does this issue can come from ?

CERTIFICATE_VERIFY_FAILED

Bonjour,

Impossible de se connecter à https://monespace.grdf.fr/monespace/particulier

#python3 gazinflux.py --days=5
2020-12-04 15:18:35,507 logging in InfluxDB Server Host 192.168.1.87...
2020-12-04 15:18:35,507 logged in InfluxDB Server Host 192.168.1.87 succesfully
2020-12-04 15:18:35,507 logging in GRDF URI https://monespace.grdf.fr/monespace/particulier...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 344, in connect
ssl_context=context)
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 345, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket
session=session
File "/usr/lib/python3.7/ssl.py", line 853, in _create
self.do_handshake()
File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='monespace.grdf.fr', port=443): Max retries exceeded with url: /web/guest/monespace?p_p_id=EspacePerso_WAR_EPportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-2&p_p_col_count=1&_EspacePerso_WAR_EPportlet__jsfBridgeAjax=true&_EspacePerso_WAR_EPportlet__facesViewIdResource=%2Fviews%2FespacePerso%2FseconnecterEspaceViewMode.xhtml (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "gazinflux.py", line 109, in main
token = gazpar.login(params['grdf']['username'], params['grdf']['password'])
File "/home/pblavier/SCRIPTS/beufanet-gazpar/gazpar.py", line 93, in login
session.get(LOGIN_BASE_URI + API_ENDPOINT_LOGIN, data=payload, allow_redirects=False)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='monespace.grdf.fr', port=443): Max retries exceeded with url: /web/guest/monespace?p_p_id=EspacePerso_WAR_EPportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-2&p_p_col_count=1&_EspacePerso_WAR_EPportlet__jsfBridgeAjax=true&_EspacePerso_WAR_EPportlet__facesViewIdResource=%2Fviews%2FespacePerso%2FseconnecterEspaceViewMode.xhtml (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "gazinflux.py", line 201, in
main()
File "gazinflux.py", line 112, in main
logging.error("unable to login on %s : %s", gazpar.API_BASE_URI, exc)
NameError: name 'exc' is not defined

Linky Ou Gazpar ?

Je te signale un 'copier/coller' dans ton readme de manière cohérente avec tes fichier de paramétres

GRANT ALL ON "gazpar" TO "gazpar" ? plutôt que linky dans ce qui suit////

Create d

> CREATE DATABASE gazpar
> CREATE USER "gazpar" WITH PASSWORD [REDACTED]
> GRANT ALL ON "gazpar" TO "linky"

(data_string, format)) ValueError: time data '0 12:00' does not match format

depuis qq jours la récup des données ne fonctionne plus:

2021-01-25 13:16:35,504 logging in InfluxDB Server Host 192.168.1.87...
2021-01-25 13:16:35,505 logged in InfluxDB Server Host 192.168.1.87 succesfully
2021-01-25 13:16:35,505 logging in GRDF URI https://monespace.grdf.fr/monespace/particulier...
2021-01-25 13:16:38,794 logged in successfully!
2021-01-25 13:16:38,794 looking for last value date on InfluxDB 'conzo_gaz' on host 192.168.1.87...
2021-01-25 13:16:38,809 found last fetch date 18/01/2021 on InfluxDB 'conzo_gaz' on host 192.168.1.87...
2021-01-25 13:16:38,809 will use 1610967600.0 as firstDate and 18/01/2021 as startDate
2021-01-25 13:16:41,967 get Data from GRDF from 18/01/2021 to 25/01/2021
Traceback (most recent call last):
File "/home/aaa/SCRIPTS/beufanet-gazpar/gazinflux.py", line 201, in
main()
File "/home/aaa/SCRIPTS/beufanet-gazpar/gazinflux.py", line 149, in main
t = datetime.datetime.strptime(d['date'] + " 12:00", '%d-%m-%Y %H:%M')
File "/usr/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.7/_strptime.py", line 359, in _strptime
(data_string, format))
ValueError: time data '0 12:00' does not match format '%d-%m-%Y %H:%M'

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.