max5962 / prixCarburant-home-assistant

Récupération des prix des stations en France
40 stars 46 forks source link

error in log #2

Closed tikismoke closed 4 years ago

tikismoke commented 4 years ago

Trying to use this service got this in log:


2020-03-22 13:52:56 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up prixCarburant platform for sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/prixCarburant/sensor.py", line 70, in setup_platform
    stations = client.extractSpecificStation(list)
  File "/srv/homeassistant/lib/python3.7/site-packages/prixCarburantClient/prixCarburantClient.py", line 159, in extractSpecificStation
    stationsXML = self.stationsXML
AttributeError: 'PrixCarburantClient' object has no attribute 'stationsXML'

my sensor file looks like this:

- platform: prixCarburant
# maxDistance: 20
  stationID:
    - 21000001
tikismoke commented 4 years ago

launching hass by hand seems to have correct this...

tikismoke commented 4 years ago

Comes again when running hass as service :(

max5962 commented 4 years ago

Sorry I just see now your issue. I'm checking this. Thanks. It seems that the Api has been in maintenance during some days.. I need to catch more errors

tikismoke commented 4 years ago

Sorry I just see now your issue. I'm checking this.

No problem, the value was ok if i launch hass command, but not when i launch HA as service. Not sure an Api issue, but why not. I suspect a path or write right issue.

max5962 commented 4 years ago

What do you mean by " ha as service"?

tikismoke commented 4 years ago

When I made systemctl start hass

Le 1 avril 2020 08:14:29 GMT+02:00, max5962 notifications@github.com a écrit :

What do you mean by " ha as service"?

-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/max5962/prixCarburant-home-assistant/issues/2#issuecomment-607056150

-- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

Attention nous avons changer de domaine, utilisez poudot.fr à la place de tikijs.dyndns.org

tikismoke commented 4 years ago

Ok error is in the lib.