You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched Issues to see if the feature has already been requested
If relevant, I have enabled debug mode and am attaching relevant console logs and HTML files
Describe the Feature
For some orders parsing return eligible dates fail with the following error:
When building Item, return_eligible_date could not be parsed.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/parsable.py", line 51, in safe_parse
return parse_function(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/item.py", line 80, in _parse_return_eligible_date
value = datetime.strptime(date_str, "%b %d, %Y").date()
File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.10/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data 'November 9, 2024\n\n\n\n$27.99$27.99\n\n\n\n\n\n\n\n\n\nBuy it again\n\n\n \n \n \n View your item' does not match format '%b %d, %Y'
The error seems to happen for all subscription items, like the one in the attached example. It has an additional line "Auto-delivered: Every 3 months"
This is due to a new tagging mechanism Amazon appears to be rolling out in the last couple weeks. It will eventually make parsing the pages a lot easier, but right now it's a but of a manual process to see what the new tags look like. Thanks for the example, I'll get this fixed!
Acknowledgements
debug
mode and am attaching relevant console logs and HTML filesDescribe the Feature
For some orders parsing return eligible dates fail with the following error:
When building Item,
return_eligible_date
could not be parsed.Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/parsable.py", line 51, in safe_parse
return parse_function(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/item.py", line 80, in _parse_return_eligible_date
value = datetime.strptime(date_str, "%b %d, %Y").date()
File "/usr/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib/python3.10/_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data 'November 9, 2024\n\n\n\n$27.99$27.99\n\n\n\n\n\n\n\n\n\nBuy it again\n\n\n \n \n \n View your item' does not match format '%b %d, %Y'
The error seems to happen for all subscription items, like the one in the attached example. It has an additional line "Auto-delivered: Every 3 months"
order-details_0 - Copy.zip
Describe Alternative Solutions/Workarounds
No response
The text was updated successfully, but these errors were encountered: