NeurodataWithoutBorders / nwbinspector

Tool to help inspect NWB files for compliance with NWB Best Practices
https://nwbinspector.readthedocs.io/
Other
17 stars 10 forks source link

[Bug]: CLI config error-catching #108

Closed CodyCBakerPhD closed 2 years ago

CodyCBakerPhD commented 2 years ago

What happened?

Also observing a very bizarre behavior where if there are actual Errors (like a ValueError) triggered within one of the test functions (see PR #106 that fixes the ones I'm seeing), they aren't grabbed within the try/except of run_checks and included in the report, but instead are raised to console as true errors:

image

but if I don't include the --config dandi they behave as expected and go into that extra section of the final report.

Steps to Reproduce

From a console with working directory located in a folder that has dandiset 000004 (or ros3, alternatively)...

nwbinspector ./000004 --config dandi

and compare to...

nwbinspector ./000004

Traceback

Screenshot in the first section; particulars of the traceback don't really matter, it's the fact that it IS a traceback pushed to the console as the standard out instead of getting grabbed by the report.

Operating System

Windows

Python Executable

Python

Python Version

3.9

Package Versions

versions.txt

Code of Conduct

CodyCBakerPhD commented 2 years ago

Related to --config usage: https://github.com/NeurodataWithoutBorders/nwbinspector/issues/216