-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Sometimes when I make a syntax error in my config, usually something small like an extra ', I get the following error logs:
Traceback (most recent call last):
File "/usr/local/bin/gallery-dl", line 7, in <module>
sys.exit(main())
~~~~^^
File "/usr/local/lib/python3.13/site-packages/gallery_dl/__init__.py", line 133, in main
output.configure_logging(args.loglevel)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/gallery_dl/output.py", line 227, in configure_logging
handler.setFormatter(Formatter(
~~~~~~~~~^
logfmt, opts.get("format-date", LOG_FORMAT_DATE)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/gallery_dl/output.py", line 147, in __init__
fmt[key] = (formatter.parse(value).format_map,
~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.13/site-packages/gallery_dl/formatter.py", line 43, in parse
formatter = _CACHE[key] = cls(format_string, default, fmt)
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/gallery_dl/formatter.py", line 104, in __init__
_string.formatter_parser(format_string):
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
ValueError: expected '}' before end of string
I know the actual issue is in the config, because I've screwed this up a few times and then fixed it, but every time, the error report is useless and tells me nothing about where in the config I should actually look. Sometimes it's easy because I haven't made many changes, but if I make enough before testing again, it's very difficult to figure out what the error is.
Is this something that can even be addressed, or would it be impossible to fix based on how gallery-dl treats the config?
Reactions are currently unavailable