Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Yandex Transport Integration (startup error) #36794

Open
kozyrevQA opened this issue Jan 7, 2025 · 1 comment
Open

Issue with Yandex Transport Integration (startup error) #36794

kozyrevQA opened this issue Jan 7, 2025 · 1 comment

Comments

@kozyrevQA
Copy link

Feedback

I am experiencing an issue when setting up the Yandex Transport integration in Home Assistant. During the setup, an error occurs while trying to call the set_new_session method in the aioymaps library:

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

Steps to reproduce:

  1. Set up the Yandex Transport integration in Home Assistant.
  2. Configure the stop coordinates and API ID.
  3. Restart Home Assistant.
  4. The error appears in the logs.

What I have tried:
I attempted to make a request to https://yandex.ru/maps/ using curl. Initially, I encountered a CAPTCHA page. After completing the CAPTCHA manually in a browser, the page loaded correctly.

Then, I sent the request again using curl, and it returned the expected HTML content. However, despite this, the integration still fails to work in Home Assistant and produces the same error.

Expected behavior:
The Yandex Transport integration should correctly retrieve the CSRF token and function without errors.

URL

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

Version

2025.1.1

Additional information

If further details or tests are needed, I am happy to assist.

@home-assistant
Copy link

home-assistant bot commented Jan 7, 2025

Hey there @rishatik92, @devbis, mind taking a look at this feedback 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 feedback.
  • @home-assistant rename Awesome new title Renames the feedback.
  • @home-assistant reopen Reopen the feedback.
  • @home-assistant unassign yandex_transport Removes the current integration label and assignees on the feedback, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information) to the feedback.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information) on the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant