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
If I read rfc3339 correctly, offsets from UTC can be specified with +0X:00. However, if I manually create a pages.jsonl with such timezone suffices, I receive an error when I run wacz create --pages pages.jsonl -f mywarc.warc.gz:
Traceback (most recent call last):
File "/usr/bin/wacz", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.12/site-packages/wacz/main.py", line 123, in main
value = cmd.func(cmd)
^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/wacz/main.py", line 211, in create_wacz
passed_pages_dict = construct_passed_pages_dict(passed_content)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/wacz/util.py", line 90, in construct_passed_pages_dict
key = iso_date_to_timestamp(page_dict.pop("ts")) +"/"+ url
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/warcio/timeutils.py", line 155, in iso_date_to_timestampreturn datetime_to_timestamp(iso_date_to_datetime(string))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/warcio/timeutils.py", line 60, in iso_date_to_datetime
the_datetime = datetime.datetime(*(int(num) for num in nums))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/warcio/timeutils.py", line 60, in <genexpr>
the_datetime = datetime.datetime(*(int(num) for num in nums))
^^^^^^^^ValueError: invalid literal for int() with base 10: ''
If I read rfc3339 correctly, offsets from UTC can be specified with
+0X:00
. However, if I manually create apages.jsonl
with such timezone suffices, I receive an error when I runwacz create --pages pages.jsonl -f mywarc.warc.gz
:pages.jsonl
Seems like the case where the timezone suffix is simply
Z
is handled correctly, though.The text was updated successfully, but these errors were encountered: