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
A couple of the boorus have a "T" in the dates like this:
%Y-%m-%dT%H:%M:%S
All the other boorus use this which works fine:
%Y-%m-%d %H:%M:%S
I get this error when I try to download something with one of those boorus:
Traceback (most recent call last):
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/path.py", line 271, in build_directory
segment = fmt(kwdict).strip()
^^^^^^^^^^^
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/formatter.py", line 172, in wrap
return fmt(kwdict[key] if key in kwdict else self.default)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/formatter.py", line 458, in wrap
return format(obj, format_spec)
^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid format specifier '%Y' for object of type 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/job.py", line 153, in run
self.dispatch(msg)
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/job.py", line 201, in dispatch
self.handle_directory(msg[1])
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/job.py", line 380, in handle_directory
self.initialize(kwdict)
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/job.py", line 544, in initialize
pathfmt.set_directory(kwdict)
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/path.py", line 188, in set_directory
segments = self.build_directory(kwdict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mane/.venv/default/lib/python3.12/site-packages/gallery_dl/path.py", line 279, in build_directory
raise exception.DirectoryFormatError(exc)
gallery_dl.exception.DirectoryFormatError: Applying directory format string failed (ValueError: Invalid format specifier '%Y' for object of type 'str')
It errors even if I set the date-format to %Y-%m-%dT%H:%M:%S
The problem was not the T in the middle, but the missing Z at the end of datetime strings such as 2024-03-14T13:46:46. When datetime parsing fails, it uses the input string as date, which in this case contains a T and causes these errors.
"format-date": "%Y-%m-%d %H:%M:%S",
format-date is not a recognized option.
To manually parse datetime strings, you can use the Dformat specifier:
I'm switching to using this for the boorus:
A couple of the boorus have a "T" in the dates like this:
All the other boorus use this which works fine:
I get this error when I try to download something with one of those boorus:
It errors even if I set the date-format to
%Y-%m-%dT%H:%M:%S
I've tried both of these:
The boorus this happens with are ponerpics.org and manebooru.art
Does anybody know what can be done to fix this?
The text was updated successfully, but these errors were encountered: