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

Use of asyncio.timeout #126

Closed
ctaggmk opened this issue Apr 16, 2024 · 6 comments
Closed

Use of asyncio.timeout #126

ctaggmk opened this issue Apr 16, 2024 · 6 comments

Comments

@ctaggmk
Copy link

ctaggmk commented Apr 16, 2024

Hi. Is this the same issue as #125? Apologies if it is!

So new installation of yahoofinance via HACS so 1.26 as of today 16 Apr 2024

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/yahoofinance/coordinator.py:67
Integration: Yahoo Finance (documentation, issues)
First occurred: 17:47:04 (1 occurrences)
Last logged: 17:47:04

Error during setup of component yahoofinance
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 256, in _async_setup_component
result = await task
File "/config/custom_components/yahoofinance/init.py", line 274, in async_setup
await _setup_coordinator()
File "/config/custom_components/yahoofinance/init.py", line 225, in _setup_coordinator
crumb = await crumb_coordinator.try_get_crumb_cookies() # Get crumb first
File "/config/custom_components/yahoofinance/coordinator.py", line 67, in try_get_crumb_cookies
async with asyncio.timeout(WEBSESSION_TIMEOUT):
AttributeError: module 'asyncio' has no attribute 'timeout'

I did try just commenting out the offending line in coordinator.py but it bombs on another use of asyncio.timeout further down (line 322 if I remember rightly) so decided to park my hacking py file skills and log an issue instead.

@ctaggmk
Copy link
Author

ctaggmk commented Apr 16, 2024

I noticed the WEBSESSION_TIMEOUT was set to 15 so edited the line and entered 15 directly. That has made no difference. It's like the version of asyncio it's using, no longer has the .timeout attribute? But I can find relatively recent Google search results on it. Has it just been deprecated?

@ctaggmk
Copy link
Author

ctaggmk commented Apr 16, 2024

Looking again at issue 125. I have no issue getting to Yahoo Finance from a browser and getting stock graphs is quick too

@iprak
Copy link
Owner

iprak commented Apr 16, 2024

What is your HomeAssiatant version?

@iprak
Copy link
Owner

iprak commented Apr 23, 2024

I strongly suspect that this is an older version of HomeAssistant, please update HomeAssistant.

@iprak
Copy link
Owner

iprak commented Apr 26, 2024

Any update on this?

@iprak
Copy link
Owner

iprak commented May 9, 2024

There has no response on this. This would have happened with older version of HomeAssistant.

@iprak iprak closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants