Unable to access data after download

In the naturalistic data tutorial, I am unable to access the data using the datalad get command. It is showing me the following error:

[ERROR ] No dataset found at ‘/home/gargi/Gargi/Naturalistic_Tut’. Specify a dataset to work with by providing its path via the dataset option, or change the current working directory to be in a dataset. [dataset.py:require_dataset:573] (NoDatasetFound)
usage: datalad get [-h] [-s LABEL] [-d PATH] [-r] [-R LEVELS] [-n]
[-D DESCRIPTION] [–reckless [auto|ephemeral|shared-…]]
[-J NJOBS]
[PATH [PATH …]]

This error persists even when I am giving the full path of the files.

I have installed datalad and ran this code to install the git-annex - sudo apt-get install git-annex, which showed me the following message: git-annex is already the newest version (8.20200226-1).

I am currently using Ubuntu. I went through the documentation of the git-annex and datalad but still am unable to solve the problem.

Hi @Gargi, sorry to hear you are having trouble with datalad.

@yarikoptic is our datalad guru.

We might need more details to be able to help. Which datasets were you trying to use (e.g., sherlock, or paranonia)? and how did you install the dataset?

Perhaps you installed the datasets within /home/gargi/Gargi/Naturalistic_Tut using something like datalad install https://gin.g-node.org/ljchang/Sherlock. If so, then I think you would need to go inside the Sherlock folder using cd /home/gargi/Gargi/Naturalistic_Tut/Sherlock before you can run the datalad get command.

1 Like

I would be happy to help but “I need more data” – e.g. what do you have under /home/gargi/Gargi/Naturalistic_Tut and how you got it there (pretty much echoing @ljchang instructions)

Thank you so much for your replies… I was trying to use the Sherlock dataset…

@yarikoptic @ljchang - I downloaded the Sherlock dataset under the Naturalistic_Tut folder using the following command !datalad install https://gin.g-node.org/ljchang/Sherlock

@ljchang As you mentioned, after entering the Sherlock folder, I could execute the command successfully… However, even now the same error persists as before when I am trying to execute the this command !datalad get -r … It is showing me the following error…

[ERROR  ] Neither dataset nor target path(s) provided [get.py:__call__:835] (InsufficientArgumentsError) 
usage: datalad get [-h] [-s LABEL] [-d PATH] [-r] [-R LEVELS] [-n]
                   [-D DESCRIPTION] [--reckless [auto|ephemeral|shared-...]]
                   [-J NJOBS]
                   [PATH [PATH ...]]

if that is the entirety of the command you ran, you first need to cd Sherlock.
But since you are in jupyter notebook and likely python, you could just use DataLad’s Python API e.g.

import datalad.api as dl
ds = dl.install('https://gin.g-node.org/ljchang/Sherlock')
ds.get(recursive=True)

or alike

Thank you for your reply @yarikoptic … I apologise for the delayed reply…yes, I am using jupyter in python…

I tried running the code as you suggested… and it is showing me the following error:

Cannot run the event loop while another loop is running

And running the command !datalad get -r after cd Sherlock is also not working… The following error is popping up

This event loop is already running

I did not run any command other than the above…

event_loop madness is a curse we finally addressed but not released. If you would be brave to pip install git+https://github.com/datalad/datalad and see if resolves issues for you – would be great.

Unfortunately it is still not working… The same error is showing up…

Hello everybody,
I’ve had a similar issue: I was not able to access the dataset (path wasn’t associated with dataset) even if data was cloned correctly (the path exists and I can see the folder within my computer)

My code was the following

!datalad install ljchang/Sherlock: Sherlock DataLad dataset on GIN - G-Node GIN

import os
import glob
import datalad.api as dl
import pandas as pd

sherlock_path = ‘/Users/lukechang/Downloads/Sherlock’

dl.clone(source=‘ljchang/Sherlock: Sherlock DataLad dataset on GIN - G-Node GIN’, path=sherlock_path)
ds = dl.Dataset(sherlock_path)

file_list = glob.glob(os.path.join(sherlock_path, ‘fmriprep’, ‘*’, ‘func’, ‘*tsv’))
file_list.sort()
file_list

result = ds.get(file_list[0])
confounds = pd.read_csv(file_list[0], sep=‘\t’)
confounds.head()

Whereas the first lines worked out, the last three resulted in the following error:
get(error): C:\Users\User\anaconda3\envs\CAMCan_playground\Sherlock\fmriprep\sub-01\func\sub-01_denoise_crop_smooth6mm_task-sherlockPart1_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz [path not associated with dataset Dataset(“\Users\User\anaconda3\envs\CAMCan_playground\Sherlock”)]

The error remained when I tried to open a specific file for doing the intersubject correlation analysis.

I currently try to download the whole dataset but, as said within the respective tutorial, it takes time and storage capacity.
Do you have any ideas how to fix the error?

Issue is solved. By changing the command ds.get() to dl.get(), data was accessible.