Skip to content

datalad.api.get() cannot take relative path (windows) #45

@yihe-61wu

Description

@yihe-61wu

issue

My colleagues and I are trying to go through these fantastic notebooks. And some of us hit this common error whenever we try to get data by

datalad.api.get('some/relative/path')

in Jupyter:

IncompleteResultsError: Command did not complete successfully. 1 failed:
[{'action': 'get',
'message': 'path does not exist',
'path': 'C:\my\secret\path\dartbrains*\data\Localizer\..\data\Localizer\*derivatives\fmriprep\sub-S01\func\sub-S01_task-localizer_desc-confounds_regressors.tsv',
'refds': 'C:\Users\anish\Documents\projects\dartbrains\data\Localizer',
'status': 'impossible'}]

solution

Strangely, in commend line if we

datalad get 'some/relative/path'

the data can be properly downloaded.

However, I kind of want to work within Jupyter without jumping to commend line every time I need some data.

After digging around all kinds of documentation and online forums, the simplest solution I found is to run

datalad.api.get(os.path.abspath('some/relative/path'))

which strikes me as I expected datalad.api.get() should be able to handle relative path.

extra info

We are all using Windows laptops (as provided by our institute). We have tried to set up everything in either an anaconda environment or anaconda root. To make things more weird, some of us seemed to be immune from the above issue.

remarks

I haven't found any issues or solutions similar to mine, regarding datalad.api.get(). So, I'm submitting the issue here, as the problem might take place only in these notebooks and specific for windows users.

I'd appreciate it if somebody could offer a more elegant solution, or explanation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions