droso-hass / idfm

Custom component for ile de france mobilités
14 stars 3 forks source link

Can't add a metro station anymore #13

Closed quentinus95 closed 1 year ago

quentinus95 commented 1 year ago

Hello, I can't add a metro station anymore. I'm getting the following trace:

2022-12-17 11:02:00.876 ERROR (MainThread) [idfm_api] Something really wrong happened! - 'Siri'
2022-12-17 11:02:00.887 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 81, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 281, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/idfm/config_flow.py", line 120, in async_step_stop
    return await self.async_step_direction()
  File "/config/custom_components/idfm/config_flow.py", line 155, in async_step_direction
    directions = await self._client.get_directions(
  File "/usr/local/lib/python3.10/site-packages/idfm_api/__init__.py", line 126, in get_directions
    for i in await self.get_traffic(stop_id):
  File "/usr/local/lib/python3.10/site-packages/idfm_api/__init__.py", line 93, in get_traffic
    data = (await self.__request(d))["MonitoredStopVisit"]
TypeError: 'NoneType' object is not subscriptable

Version 2.0.2 (same issue with 2.1.0) on latest Home Assistant release.

drosoCode commented 1 year ago

Can you try the new release (2.1.1) ? It fixes some errors with the API. If the error persists, could you repost your logs ? They should now contain more detailed warning messages.

oudoulj commented 1 year ago

Works for me again with 2.1.1 🎉 Thanks a lot !

oudoulj commented 1 year ago

Something was broken earlier on https://api-iv.iledefrance-mobilites.fr/lines/v2/line:IDFM:C01149/stops/stop_area:IDFM:73166/realTime because I have just refreshed the tab in Chrome and it does respond with schedules.

Same with that page of Me déplacer IDFM that was showing some kind of error within the form 🤷