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

BIDS Validation failing due to lru_cache #117

Open
pollaro opened this issue May 17, 2024 · 1 comment
Open

BIDS Validation failing due to lru_cache #117

pollaro opened this issue May 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pollaro
Copy link

pollaro commented May 17, 2024

What happened?

I added a step in the Dockerfile to copy over some matlab code that I edited. Just one m file.
I built the Dockerfile.
When I run the container/image that's created I get:

  File "/app/run.py", line 33, in <module>
    from helpers import read_bids_dataset, validate_config, validate_license
  File "/app/helpers.py", line 6, in <module>
    from bids.layout import BIDSLayout
  File "/usr/local/lib/python3.6/dist-packages/bids/__init__.py", line 3, in <module>
    from .layout import BIDSLayout
  File "/usr/local/lib/python3.6/dist-packages/bids/layout/__init__.py", line 1, in <module>
    from .layout import BIDSLayout, add_config_paths, parse_file_entities
  File "/usr/local/lib/python3.6/dist-packages/bids/layout/layout.py", line 20, in <module>
    from .index import BIDSLayoutIndexer
  File "/usr/local/lib/python3.6/dist-packages/bids/layout/index.py", line 11, in <module>
    from bids_validator import BIDSValidator
  File "/usr/local/lib/python3.6/dist-packages/bids_validator/__init__.py", line 2, in <module>
    from .bids_validator import BIDSValidator
  File "/usr/local/lib/python3.6/dist-packages/bids_validator/bids_validator.py", line 8, in <module>
    class BIDSValidator():
  File "/usr/local/lib/python3.6/dist-packages/bids_validator/bids_validator.py", line 124, in BIDSValidator
    @lru_cache
  File "/usr/lib/python3.6/functools.py", line 477, in lru_cache
    raise TypeError('Expected maxsize to be an integer or None')
TypeError: Expected maxsize to be an integer or None

What command did you use?

docker run --rm --user="<user_#>:<group_#>" -v <data_in>:/bids_input:ro -v <data_out>:/output -v freesurfer/license.txt:/license.txt:ro edited_abcd-hcp-pipeline /bids_input /output --freesurfer-license=/opt/freesurfer/license.txt --ncpus=12 --participant-label=02

What version of the abcd-hcp pipeline are you using?

latest

Directory Structure

No response

Relevant log output

No response

Add any additional information or context about the problem here.

I ran the command with the dcanumn/abcd-hcp-pipeline and it works. I don't understand why copying one m-file causes a python error

@pollaro pollaro added the bug Something isn't working label May 17, 2024
@madisoth
Copy link
Collaborator

madisoth commented Jun 1, 2024

Looks like in addition to pybids we need to pin the bids-validator version, probably to 1.14.0 (which is what's in our v0.1.4 Dockerhub build)

This update looks like the one that broke things on our end: bids-standard/bids-validator@5a3ab0b

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

2 participants