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

Time data does not match format #4

Open
TheSuperBeaver opened this issue Oct 16, 2024 · 2 comments
Open

Time data does not match format #4

TheSuperBeaver opened this issue Oct 16, 2024 · 2 comments

Comments

@TheSuperBeaver
Copy link

TheSuperBeaver commented Oct 16, 2024

Hi Markus !

I have a bug with one of the latest versions of astroweather and pyastroweatherio

in the homeassistant log i receive this error multiple times :

2024-10-16 16:40:25.173 ERROR (MainThread) [custom_components.astroweather] Unexpected error fetching astroweather data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 370, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 279, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 138, in get_location_data return await self._get_location_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 371, in _get_location_data "uptonight_comets": await self._get_comets(), ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyastroweatherio/client.py", line 949, in _get_comets datetime.strptime(rise_time_local, "%m/%d/%Y %H:%M:%S") File "/usr/local/lib/python3.12/_strptime.py", line 554, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/_strptime.py", line 333, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '2024-10-15 07:07:08' does not match format '%m/%d/%Y %H:%M:%S'

Is it maybe a version that I should have upgraded but forgot ?

@mawinkler
Copy link
Owner

Hi,
which versions are you using of hass, astroweather and pyastroweatherio?

@TheSuperBeaver
Copy link
Author

The error appears when I'm on hass : 2024.11.0.dev202410140231
with astroweather : 0.61.1
and pyastroweatherio : 0.61.1 (I believe, i didn't upgraded this one, not sure that i need to since it's a dependency)

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