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

fetch_pain() issue #422

Open
MtKana opened this issue Oct 5, 2023 · 2 comments
Open

fetch_pain() issue #422

MtKana opened this issue Oct 5, 2023 · 2 comments

Comments

@MtKana
Copy link

MtKana commented Oct 5, 2023

I am trying to run your plot_multivariate_classification.ipynb example.
But when I run fetch_pain(), I get this error
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/Users/kanamatsuyanagi/fmri_prep/plot_multivariate_classification.ipynb Cell 5 line 1
----> 1 data = fetch_pain()

File ~/anaconda3/envs/fmri2/lib/python3.11/site-packages/nltools/datasets.py:135, in fetch_pain(data_dir, resume, verbose)
131 data_dir = _get_dataset_dir(dataset_name, data_dir=data_dir, verbose=verbose)
132 metadata, files = download_collection(
133 collection=collection, data_dir=data_dir, resume=resume, verbose=verbose
134 )
--> 135 return Brain_Data(data=files, X=metadata)

File ~/anaconda3/envs/fmri2/lib/python3.11/site-packages/nltools/data/brain_data.py:230, in Brain_Data.init(self, data, Y, X, mask, **kwargs)
228 if isinstance(X, pd.DataFrame):
229 if self.data.shape[0] != X.shape[0]:
--> 230 raise ValueError("X does not match the correct size " "of data")
231 self.X = X
232 else:

ValueError: X does not match the correct size of data`

I've tried reinstalling your package and recreating my conda environment but I get the same error.

I appreciate any help.

@ljchang
Copy link
Member

ljchang commented Oct 5, 2023

Hi @MtKana, sorry to hear that you're having trouble downloading the dataset. Unfortunately, I'm not able to replicate your issue on my computer.

Screenshot 2023-10-05 at 2 53 34 PM

There were some issues with neurovault recently with accessing the metadata and we made a few small internal changes.

I'm wondering if it is just an issue with updating your copy of nltools to incorporate these new changes as I don't believe we made a new release yet.

To test this, try uninstalling nltools and then reinstalling it and see if it resolves your issue.

@MtKana
Copy link
Author

MtKana commented Oct 14, 2023

Thank you for your response!

Unfortunately, I am still having the same issue after reinstalling nltools.
But I will try again soon. This time I am going to rebuild my python environment too.

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