pydoit / doit

CLI task management & automation tool
http://pydoit.org
MIT License
1.85k stars 175 forks source link

Broken dependency in v0.34 #410

Closed igordertigor closed 2 years ago

igordertigor commented 2 years ago

Describe the bug

I'm running doit on github actions, where I had been installing doit without a fixed version number. Today, my builds started crashing with the following error message:

Successfully installed MarkupSafe-2.0.1 cloudpickle-2.0.0 doit-0.34.0 jinja2-3.0.3 pyinotify-0.9.6 wheel-0.37.0
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.12/x64/bin/doit", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/doit/__main__.py", line 8, in main
    sys.exit(DoitMain().run(sys.argv[1:]))
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/doit/doit_cmd.py", line 187, in __init__
    config_in.loads(config_filenames)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/doit/doit_cmd.py", line 64, in loads
    toml_config = self.load_config_toml(config_filename, prefix)
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/doit/doit_cmd.py", line 119, in load_config_toml
    if not self.toml:
  File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/doit/doit_cmd.py", line 85, in toml
Error:     raise Exception('TOML lib not found, could not parse config file XXX.')
Exception: TOML lib not found, could not parse config file XXX.
Error: Process completed with exit code 1.

Note the version number for doit: 0.34.0. Downgrading to 0.33.1 fixes this. I can't reproduce this locally but it's quite reliable on github actions.

Upvote & Fund

Fund with Polar

schettino72 commented 2 years ago

The problem is that your project contains a pyproject.toml so doit will try to parse it but there is no TOML lib installed.

Just install one... right now there is no way to say "do not try to read the pyproject.toml file". Maybe it should just give a warning...

The XXX instead of file name is obviously a mistake.

igordertigor commented 2 years ago

I see the point. Maybe add a warning for the transition? Anyway, I know what to do then. Thank you.