Skip to content

Conversation

@hoechenberger
Copy link
Member

@hoechenberger hoechenberger commented Jun 1, 2023

We had a user on the forum who got an error message about a missing file that didn't actually seem to be missing. Turns out a trailing space was present in the search path, which was hard to spot.

https://mne.discourse.group/t/the-source-estimate-is-not-displayed-i-think-it-may-be-a-bug/6993/4

Here, I'm changing the FileNotFoundError message to put the path in quotation marks to help identify such issues quicker in the future.

…arks to help spot accidental trailing spaces
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to mark as merge when green when you're done / out of draft mode

Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to mark as merge when green when you're done / out of draft mode

@hoechenberger hoechenberger marked this pull request as ready for review June 1, 2023 12:02
@hoechenberger hoechenberger changed the title If _check_fname() cannot find a file, display the path in quotation marks to help spot accidental trailing spaces MRG: If _check_fname() cannot find a file, display the path in quotation marks to help spot accidental trailing spaces Jun 1, 2023
@hoechenberger
Copy link
Member Author

Failing tests are unrelated

@hoechenberger hoechenberger enabled auto-merge (squash) June 1, 2023 13:56
@hoechenberger hoechenberger merged commit dd9a407 into main Jun 1, 2023
@larsoner larsoner deleted the check-fname-quote-path branch June 1, 2023 17:24
larsoner added a commit to larsoner/mne-python that referenced this pull request Jun 23, 2023
* upstream/main: (24 commits)
  Allow int-like as ID of make_fixed_length_events (mne-tools#11748)
  Easycap-M43 montage (mne-tools#11744)
  ENH: Create a Calibrations class for eyetracking data (mne-tools#11719)
  Fix alphabetical order in overview/people.rst, fix sphinx formatting in docstrings and set verbose to keyword-only (mne-tools#11745)
  Add Mathieu Scheltienne to MNE-Python Steering Council (mne-tools#11741)
  removed requirement for curv.*h files to create Brain object (mne-tools#11704)
  [BUG] Fix mne.viz.Brain.add_volume_labels matrix ordering bug (mne-tools#11730)
  Fix installer links (mne-tools#11729)
  MAINT: Update for PyVista deprecation (mne-tools#11727)
  MAINT: Update roadmap (mne-tools#11724)
  MAINT: Update download link [skip azp] [skip cirrus] [skip actions]
  fix case for chpi_info[1] == None (mne-tools#11714)
  Add cmap argument for mne.viz.utils.plot_sensors (mne-tools#11720)
  BUG: Fix one more PySide6 bug (mne-tools#11723)
  MAINT: Fix PySide6 and PyVista compat (mne-tools#11721)
  MRG: If _check_fname() cannot find a file, display the path in quotation marks to help spot accidental trailing spaces (mne-tools#11718)
  Add "array-like" to `_validate_type()` (mne-tools#11713)
  MAINT: Avoid problematic PySide6 (mne-tools#11715)
  Fix installer links (mne-tools#11709)
  Updating change log after PR mne-tools#11575 (mne-tools#11707)
  ...
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.

4 participants