home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.62k stars 30.38k forks source link

Error while setting up Yandex Transport platform for sensor #105253

Closed Kazarnikov closed 7 months ago

Kazarnikov commented 10 months ago

The problem

Error while setting up Yandex Transport platform for sensor

What version of Home Assistant Core has the issue?

core-2023.11

What was the last working version of Home Assistant Core?

~ core-2023.08 - core-2023.08

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Yandex Transport

Link to integration documentation on our website

https://www.home-assistant.io/integrations/yandex_transport

Diagnostics information

No response

Example YAML snippet

transport:

  sensor:
    #1.0 Яндекс транспрт
    - platform: yandex_transport
      name: bus_rasskazovka
      stop_id: '3224830837'
      routes:
        - 886
        - 750
        - 950
        - 750k
        - 950k
        - 750к
        - 950к

    - platform: yandex_transport
      name: bus_vnukovo
      stop_id: '2066384144'
      routes:
        - 886

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Сенсор (documentation, issues)
First occurred: 22:03:57 (2 occurrences)
Last logged: 22:03:57

Error while setting up yandex_transport platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/src/homeassistant/homeassistant/components/yandex_transport/sensor.py", line 59, in async_setup_platform
    await ymaps.set_new_session()
  File "/usr/local/lib/python3.11/site-packages/aioymaps.py", line 93, in set_new_session
    self._config[PARAMS][CSRF_TOKEN_KEY] = result.group(1)
                                           ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'group'

Additional information

No response

home-assistant[bot] commented 10 months ago

Hey there @rishatik92, @devbis, mind taking a look at this issue as it has been labeled with an integration (yandex_transport) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `yandex_transport` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign yandex_transport` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


yandex_transport documentation yandex_transport source (message by IssueLinks)

devbis commented 10 months ago

@Kazarnikov It is a known state, yandex servers bans randomly for some time. There is no known way at the moment to avoid this behavior. Sometimes it connects, sometimes doesn't.

Small discussion was here: https://github.com/home-assistant/core/issues/68884

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.