Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WARNING] Could not load extension 'next': ImportError(cannot import name 'Dataset' from partially initialized module 'datalad.api' #703

Closed
FeHoff opened this issue May 21, 2024 · 1 comment

Comments

@FeHoff
Copy link

FeHoff commented May 21, 2024

I get the following warning but the dataset is setup with the yoda procedure as expected.

❯ dl create -c yoda TEST
[INFO   ] Running procedure cfg_yoda 
[INFO   ] == Command start (output follows) ===== 
[WARNING] Could not load extension 'next': ImportError(cannot import name 'Dataset' from partially initialized module 'datalad.api' (most likely due to a circular import) (/home/fhoffstaedter/datalad_venv/lib/python3.9/site-packages/datalad/api.py)) 
[INFO   ] == Command exit (modification check follows) =====                               
run(ok): /home/fhoffstaedter/DATA_TMP/TEST (dataset) [/home/fhoffstaedter/datalad_venv/bin/pyt...]
create(ok): /home/fhoffstaedter/DATA_TMP/TEST (dataset)
action summary:
  create (ok: 1)
  run (ok: 1)
datalad create -c yoda TEST  7.06s user 2.16s system 95% cpu 9.611 total
❯ cd TEST; dl run-procedure cfg_yoda
[INFO   ] Running procedure cfg_yoda 
[INFO   ] == Command start (output follows) ===== 
[WARNING] Could not load extension 'next': ImportError(cannot import name 'Dataset' from partially initialized module 'datalad.api' (most likely due to a circular import) (/home/fhoffstaedter/datalad_venv/lib/python3.9/site-packages/datalad/api.py)) 
[INFO   ] == Command exit (modification check follows) =====                               
run(ok): /home/fhoffstaedter/DATA_TMP/TEST (dataset) [/home/fhoffstaedter/datalad_venv/bin/pyt...]
datalad run-procedure cfg_yoda  5.98s user 1.42s system 97% cpu 7.565 total
❯ dl --version
datalad 1.0.2
❯ python
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datalad.distribution.dataset import require_dataset 
>>> from datalad.utils import create_tree 
>>> 
>>> ds = require_dataset('.') 
>>> ds
Dataset('/home/fhoffstaedter/DATA_TMP/TEST')
>>> ds.status()
[WARNING] Could not load extension 'next': ImportError(cannot import name 'Dataset' from partially initialized module 'datalad.api' (most likely due to a circular import) (/home/fhoffstaedter/datalad_venv/lib/python3.9/site-packages/datalad/api.py)) 
nothing to save, working tree clean
@mih
Copy link
Member

mih commented May 21, 2024

I can replicate this. I have determined the behavior to change after the merge of #669

Specifically, c5b3620 is still working, but 096a567 is not. The breakage is still present post-1.4.0 in a812396

It got fixed via 905b99b in #701

Ping @christian-monch

@mih mih closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants