dib-lab / dammit

just annotate it, dammit!
http://dib-lab.github.io/dammit/
Other
88 stars 28 forks source link

TaskLoader issue #239

Open jarcasariego opened 1 year ago

jarcasariego commented 1 year ago

Hi,

I got dammit installed though anaconda and get a taskloader error while trying to run a database build command

dammit databases --install --database-dir ~/dammit --full --busco-group metazoa

Error

## submodule: databases
Traceback (most recent call last):
  File "/cm/shared/apps/mamba/current/envs/dammit/bin/dammit", line 9, in <module>
    sys.exit(app.DammitApp(arg_src=sys.argv[1:]).run())
  File "/cm/shared/apps/mamba/current/envs/dammit/lib/python3.8/site-packages/dammit/app.py", line 45, in run
    return self.args.func()
  File "/cm/shared/apps/mamba/current/envs/dammit/lib/python3.8/site-packages/dammit/app.py", line 278, in handle_databases
    handler = databases.get_handler(self.config_d)
  File "/cm/shared/apps/mamba/current/envs/dammit/lib/python3.8/site-packages/dammit/databases.py", line 41, in get_handler
    handler = TaskHandler(config['database_dir'],
  File "/cm/shared/apps/mamba/current/envs/dammit/lib/python3.8/site-packages/dammit/handler.py", line 49, in __init__
    super(TaskHandler, self).__init__()
  File "/cm/shared/apps/mamba/current/envs/dammit/lib/python3.8/site-packages/doit/cmd_base.py", line 289, in __init__
    raise NotImplementedError(
NotImplementedError: doit.cmd_base.py:TaskLoader was removed on 0.36.0, use TaskLoader2 instead

Is there a way around this, or will I have to wait until dammit code is updated to use TaskLoader2?

margaretc-ho commented 1 year ago

I have exactly the same issue, what do you advise? thanks!

NickCrews commented 1 year ago

Totally drive-by-ing here, so I can't help much more than this, but the short term fix is to downgrade doit to a version below 0.36.0 (version 0.35.0 looks like it should work and isn't that old).

I've never used conda, so the following is a guess from reading https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#:

  1. In the correct conda environment, check that 0.36.0 is actually installed: conda list or conda list doit
  2. remove it: conda remove doit
  3. check that it's gone: conda list again
  4. install the pinned version: conda install pydoit=0.35.0
  5. check that it's installed: conda list again
NickCrews commented 1 year ago

Added a PR above that MIGHT be a more permanent fix.

margaretc-ho commented 1 year ago

Thanks this did work!

In the correct conda environment, check that 0.36.0 is actually installed: conda list or conda list doit remove it: conda remove doit check that it's gone: conda list again install the pinned version: conda install doit=0.35.0 check that it's installed: conda list again