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

ENH: Make suggestion #1087

Merged
merged 1 commit into from Oct 17, 2022
Merged

ENH: Make suggestion #1087

merged 1 commit into from Oct 17, 2022

Conversation

larsoner
Copy link
Member

Gives a more helpful error message:

FileNotFoundError: File does not exist:
/mnt/bakraid/larsoner/opm_reading/tutorial_OPM_data/sub-001/ses-001/meg/sub-001_ses-001_task-noise_run-001_meg
Did you mean one of:
sub-001_ses-001_task-noise_run-001_meg.bin
sub-001_ses-001_task-noise_run-001_meg.json
sub-001_ses-001_task-noise_run-001_nulls.tsv
instead of:
sub-001_ses-001_task-noise_run-001_meg

In this case the file can't be read because .bin OPM reading isn't implemented in MNE-Python, but this makes it easier to find other errors like a bad task as well.

@codecov
Copy link

codecov bot commented Oct 17, 2022

Codecov Report

Merging #1087 (89fab0c) into main (9231836) will decrease coverage by 0.35%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1087      +/-   ##
==========================================
- Coverage   95.19%   94.84%   -0.36%     
==========================================
  Files          24       24              
  Lines        3853     3859       +6     
==========================================
- Hits         3668     3660       -8     
- Misses        185      199      +14     
Impacted Files Coverage Δ
mne_bids/read.py 94.13% <100.00%> (-1.83%) ⬇️
mne_bids/write.py 96.60% <0.00%> (-0.61%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@agramfort agramfort merged commit 861ccd1 into mne-tools:main Oct 17, 2022
@agramfort
Copy link
Member

thx @larsoner

@larsoner larsoner deleted the suggest branch October 17, 2022 19:50
sappelhoff pushed a commit to sappelhoff/mne-bids that referenced this pull request Oct 21, 2022
sappelhoff added a commit that referenced this pull request Oct 21, 2022
* avoid creating many Annotations objects in for loop (#1079)

* ENH: Better error message (#1080)

* ENH: Better error message

* FIX: Beautiful infrastructure

* FIX: Spacing

* ENH: Improve error message (#1081)

* ENH: Improve error message

* FIX: Use working openneuro-py

* FIX: Install

* FIX: Name

* ENH: Make suggestion (#1087)

* MRG: Enforce specification of all annotation descriptions in event_id if event_id is passed to write_raw_bids() (#1086)

* Write all annotations even if event_id was passed

* Implement new logic

* Update changelog

* Fix tests

* Style

* REL: v0.11.1

Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants