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

TypeError: slice indices must be integers or None or have an __index__ method #367

Open
monique2208 opened this issue May 5, 2022 · 0 comments

Comments

@monique2208
Copy link

Hey

I ran fitlins using the latest (0.10.0) docker image on a dataset that also contained physio data and got the following error.

Traceback (most recent call last):
  File "/opt/miniconda-latest/envs/neuro/bin/fitlins", line 8, in <module>
    sys.exit(main())
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/fitlins/cli/run.py", line 432, in main
    sys.exit(run_fitlins(sys.argv[1:]))
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/fitlins/cli/run.py", line 424, in run_fitlins
    graph.load_collections(**selectors)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/modeling/statsmodels.py", line 201, in load_collections
    collections = self.layout.get_collections(node.level, drop_na=drop_na,
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/layout/layout.py", line 840, in get_collections
    index = load_variables(self, types=types, levels=level,
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/variables/io.py", line 92, in load_variables
    dataset = _load_time_variables(layout, dataset, scope=scope, **_kwargs)
  File "/opt/miniconda-latest/envs/neuro/lib/python3.9/site-packages/bids/variables/io.py", line 353, in _load_time_variables
    values = data.values[start_ind:, :]
TypeError: slice indices must be integers or None or have an __index__ method

Without the physio data the model runs with no problem. I think it might be just an issue with pybids. Line 352 uses np.floor to set start index and I don't think this always returns integers.

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

1 participant