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

[BUG] cannot get data when passing dataset name in command line #170

Open
1 task done
Remi-Gau opened this issue Jan 19, 2024 · 0 comments
Open
1 task done

[BUG] cannot get data when passing dataset name in command line #170

Remi-Gau opened this issue Jan 19, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@Remi-Gau
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Expected Behavior

getting data should be possible by just passing the dataset name in the command line and not a path to a tsv

Current Behavior

crashes

Error message

Traceback (most recent call last):
  File "/home/remi/miniconda3/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3791, in get_loc
    return self._engine.get_loc(casted_key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "index.pyx", line 152, in pandas._libs.index.IndexEngine.get_loc
  File "index.pyx", line 181, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'PortalURI'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/remi/miniconda3/bin/cohort_creator", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/remi/github/origami/cohort_creator/cohort_creator/_cli.py", line 107, in cli
    get_data(
  File "/home/remi/github/origami/cohort_creator/cohort_creator/main.py", line 157, in get_data
    dataset_names = get_list_datasets_to_install(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/remi/github/origami/cohort_creator/cohort_creator/_utils.py", line 584, in get_list_datasets_to_install
    dataset_uri = dataset_listing[dataset_listing["DatasetID"] == dataset]["PortalURI"].values[
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/remi/miniconda3/lib/python3.11/site-packages/pandas/core/frame.py", line 3893, in __getitem__
    indexer = self.columns.get_loc(key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/remi/miniconda3/lib/python3.11/site-packages/pandas/core/indexes/base.py", line 3798, in get_loc
    raise KeyError(key) from err
KeyError: 'PortalURI'

Environment

  • OS: ubuntu 22.04
  • Python/Node version: 3.11

How to reproduce

cohort_creator install -d ds002785 -o outputs/ --dataset_types fmriprep
cohort_creator get -d ds002785 -o outputs/ --dataset_types fmriprep --datatypes func --space MNI152NLin2009cAsym -p outputs/code/participants.tsv

Anything else?

No response

@Remi-Gau Remi-Gau added the bug Something isn't working label Jan 19, 2024
@Remi-Gau Remi-Gau added this to the 2024-02 milestone Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant