Skip to content

ValueError: unconverted data remains: AM #75

Description

@lsaffre

I had the following traceback:

Traceback (most recent call last):
...
File "/usr/local/lino/lino_local/stewards/env/lib/python3.13/site-packages/asgiref/sync.py", line 372, in main_wrap
result = await awaitable
^^^^^^^^^^^^^^^
File "/usr/local/lino/lino_local/stewards/env/lib/python3.13/site-packages/lino_xl/lib/weather/models.py", line 184, in aget_weather_forecasts
return await client.get(dd.plugins.weather.place_name) # DailyForecast
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lino/lino_local/stewards/env/lib/python3.13/site-packages/python_weather/client.py", line 185, in get
return Forecast(await resp.json(content_type='text/plain'), unit, locale)
File "/usr/local/lino/lino_local/stewards/env/lib/python3.13/site-packages/python_weather/forecast.py", line 262, in __init__
datetime.strptime(current['observation_time'], '%I:%M %p').time(),
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/_strptime.py", line 673, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/_strptime.py", line 455, in _strptime
raise ValueError("unconverted data remains: %s" %
data_string[found.end():])
ValueError: unconverted data remains: AM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions