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

error due to 'PosixPath' versus 'str' TypeError #8

Open
pvavra opened this issue Nov 22, 2019 · 3 comments
Open

error due to 'PosixPath' versus 'str' TypeError #8

pvavra opened this issue Nov 22, 2019 · 3 comments

Comments

@pvavra
Copy link
Contributor

pvavra commented Nov 22, 2019

Trying to walk through the example study, we are getting an error (but only when running this on medusa, it seems).

At the stage of importing the dcm, it fails:

datalad hirni-import-dcm --anon-subject 001 https://github.com/datalad/example-dicom-structural/archive/master.tar.gz acq1
[INFO   ] Creating a new annex repo at /home/data/sfb_cuetarget/scratch/my_raw_dataset/acq1/dicoms 
[INFO   ] Adding content of the archive master.tar.gz into annex <AnnexRepo path=/home/data/sfb_cuetarget/scratch/my_raw_dataset/acq1/dicoms (<class 'datalad.support.annexrepo.AnnexRepo'>)> 
[INFO   ] Finished adding master.tar.gz: Files processed: 389, +git: 2, +annex: 387 
[ERROR  ] '<' not supported between instances of 'str' and 'PosixPath' [status.py:__call__:324] (TypeError)      

The error seems to happen after the metadata processing (I see a bunch of progress bars just fine, but they then jump to the error).

This is currently using python 3.6.9. Using the default (system-level installed on cluster) 3.5 python version was giving this problem at another location (complaining about 'PosixPath' not having a 'startswith' function).

Not sure this is due to datalad or hirni or a weird setup on the medusa cluster. On my local machine this works fine (using 3.6.8).

Note on python setup:
Converining the python environment, I created a virtual environment using
python3 -m venv datalad
and than updated pip and setuptools using the following oneliner
pip list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip install -U

and than installed (in that order) datalad
pip install git+https://github.com/datalad/datalad
and hirni:
pip install git+https://github.com/psychoinformatics-de/datalad-hirni.git#egg=datalad_hirni

datalad_wtf.txt

@pvavra pvavra changed the title error due to 'PosixPath' versus 'str' error due to 'PosixPath' versus 'str' TypeError Nov 22, 2019
@bpoldrack
Copy link
Contributor

Hey @pvavra,

thanks for trying and reporting!

This smells like psychoinformatics-de/datalad-hirni#129

Currently datalad-hirni is incompatible with datalad 0.12.0rc6 (+ python below something around 3.7). Trying to get the fixes merged and released in the dependency chain (can't be fixed within datalad-hirni alone) and will report back here.

However, I'm not sure how you ended up with datalad 0.12.0rc6. Could you please try to explicitly install pip install datalad==0.12.0rc5 and see whether that works for you?

@bpoldrack
Copy link
Contributor

PS:
Now I see it. You installed datalad from cutting edge master branch directly. So, for now, try installing as mentioned above or just install datalad-hirni in a fresh environment. It depends on datalad and will currently install 0.12.0rc4 automatically.

@pvavra
Copy link
Contributor Author

pvavra commented Nov 23, 2019

Yep, looks like related to the above issue. Moving conversation there.
Feel free to close issue here (and if you want me to open a new one at datalad_hirni, let me know)

[sorry for posting in the wrong place.. was late last night..]

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