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
Missing/incorrect method when loading TOML configuration data
When loading a TOML configuration file on Luigi==3.1.0, I get the following backtrace:
Traceback (most recent call last):
File "/home/user/luigi-test-proj/venv/bin/luigi", line 8, in <module>
sys.exit(luigi_run())
File "/home/user/luigi-test-proj/venv/lib/python3.9/site-packages/luigi/cmdline.py", line 9, in luigi_run
run_with_retcodes(argv)
File "/home/user/luigi-test-proj/venv/lib/python3.9/site-packages/luigi/retcodes.py", line 71, in run_with_retcodes
retcodes = retcode()
File "/home/user/luigi-test-proj/venv/lib/python3.9/site-packages/luigi/task_register.py", line 87, in __call__
param_values = cls.get_param_values(params, args, kwargs)
File "/home/user/luigi-test-proj/venv/lib/python3.9/site-packages/luigi/task.py", line 439, in get_param_values
if task_family in conf.sections():
AttributeError: 'LuigiTomlParser' object has no attribute 'sections'
When I take a look at the LuigiTomlParser, it's pretty easy to see a way to fix this with minimal effort, by adding a sections() method that just returns a simple list of the sections-
+ def sections(self):+ """Return a list of sections as list of strings"""+ return [section for section in self.data.keys() if section.lower() != 'logging']+
I will attach my configuration file, though it's worth mentioning the example toml from this repo also causes the issue
The text was updated successfully, but these errors were encountered:
mzpqnxow
added a commit
to mzpqnxow/luigi
that referenced
this issue
Jul 11, 2022
Missing/incorrect method when loading TOML configuration data
When loading a TOML configuration file on Luigi==3.1.0, I get the following backtrace:
When I take a look at the
LuigiTomlParser
, it's pretty easy to see a way to fix this with minimal effort, by adding asections()
method that just returns a simple list of the sections-I will attach my configuration file, though it's worth mentioning the example toml from this repo also causes the issue
The text was updated successfully, but these errors were encountered: