{"id":21002,"library":"bids-validator","title":"BIDS Validator","description":"The BIDS Validator checks that a dataset directory conforms to the Brain Imaging Data Structure (BIDS) specification. It reports errors, warnings, and suggestions. The current PyPI version is 1.14.7.post0 (a legacy version); the actively developed JavaScript/Node version is 2.4.1. The Python package is a wrapper around the Node.js validator and is in maintenance mode. Release cadence is irregular.","status":"maintenance","version":"1.14.7.post0","language":"python","source_language":"en","source_url":"https://github.com/bids-standard/bids-validator","tags":["BIDS","neuroimaging","validation","dataset"],"install":[{"cmd":"pip install bids-validator","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"The Python package requires Node.js to run the actual validator.","package":"node","optional":false}],"imports":[{"note":"The Python module is 'bids_validator', not 'bids-validator'.","symbol":"BIDSValidator","correct":"from bids_validator import BIDSValidator"}],"quickstart":{"code":"from bids_validator import BIDSValidator\nvalidator = BIDSValidator()\n# Validate a dataset directory\nresult = validator.validate('/path/to/dataset')\n# Iterate over issues\nfor issue in result['issues']:\n    print(issue['severity'], issue['key'], issue['message'])","lang":"python","description":"Validate a BIDS dataset and print all issues."},"warnings":[{"fix":"Use the Node.js validator by running 'bids-validator' via npx or install the npm package. For Python-only workflows, consider using the 'bids-validator' command-line tool installed with pip, but expect limited updates.","message":"The Python package (PyPI) is a legacy wrapper around an older version of the Node.js validator. The actively developed version is the Node.js package (npm). New features and schema updates are only available in the Node.js version.","severity":"deprecated","affected_versions":">=1.0.0, <2.0.0"},{"fix":"Use 'from bids_validator import BIDSValidator'.","message":"The Python package 'bids-validator' is imported as 'bids_validator' (underscore), not the hypenated name. Many users mistakenly try 'from bids-validator import ...' which causes a syntax error.","severity":"gotcha","affected_versions":"all"},{"fix":"Install Node.js (>=12) from https://nodejs.org/ or via your package manager.","message":"The Python package requires Node.js to be installed. If Node.js is missing, the validator will fail with an obscure error or silently not work.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the Node.js version for full BIDS schema support (v1.11.x). For Python, consider other tools like 'pybids' for programmatic access.","message":"Between version 1.x and 2.x of the node package (which the Python wrapper does not match), the API changed significantly. The Python package is pinned to an older schema version and may not validate datasets following newer BIDS specification versions.","severity":"breaking","affected_versions":"1.x (Python)"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'import bids_validator' (or 'from bids_validator import BIDSValidator').","cause":"Attempting to import with a hyphen instead of an underscore.","error":"ModuleNotFoundError: No module named 'bids-validator'"},{"fix":"After pip install, try 'python -m bids_validator' or install the Node.js version via npm.","cause":"The pip install does not install an executable named 'bids-validator' on all platforms, or the PATH is not set properly.","error":"bids-validator: command not found"},{"fix":"Ensure Node.js is installed and run 'npx bids-validator' or 'npm install -g bids-validator'.","cause":"The Node.js validator is not installed when using the Python package, or the wrong version is installed.","error":"Error: Cannot find module 'bids-validator'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}