-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
FIX: Gracefully handle bad XML files in EGI reader #13145
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
Merged
Merged
+23
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
larsoner
reviewed
Mar 6, 2025
Eric suggestion Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
- use importorskip - require testing data - use context manager to open and write to file - use tmp_path fixture
scott-huberty
added a commit
to scott-huberty/mne-python
that referenced
this pull request
Mar 6, 2025
- As seen in The failing ubuntu-latest job of mne-tools#13145 https://github.com/mne-tools/mne-python/actions/runs/13702975846/job/38321283000?pr=13145#step:16:5679 I cannot replicate this locally on my MacOS, but from what I can gather, the .magic method is deprecated (ref ipython/ipython#10327 ), and so test_widget_abstraction_notebook fails with the lastest IPython (9.0.1) Let's try to use run_line_magic instead, which seems to be the recommended way
Contributor
Author
|
Needs #13146 (or some other fix for the failing |
Member
|
Okay let's wait for #13146 then and then we can click the |
larsoner
reviewed
Mar 6, 2025
Suggested by @larsoner Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
auto-merge was automatically disabled
March 6, 2025 18:35
Head branch was pushed to by a user without write access
scott-huberty
added a commit
to scott-huberty/mne-python
that referenced
this pull request
Mar 6, 2025
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Apr 4, 2025
* upstream/main: (149 commits) FIX make_watershed_bem to handle missing talairach_with_skull.lta courtesy Freesurfer 8 (mne-tools#13172) ENH: Add upsampling for MEG helmet surface (mne-tools#13179) MAINT: Update code credit (mne-tools#13180) BUG: Fix bug with least-squares sphere fit (mne-tools#13178) fix EDF export (mne-tools#13174) fix typo (mne-tools#13171) [pre-commit.ci] pre-commit autoupdate (mne-tools#13164) Fix dev installation guide (mne-tools#13163) expose 'mode' for plotting dipole on brain (mne-tools#13162) turn dipole attrs into properties (mne-tools#13153) remove misformatted (and unused) crossref anchor (mne-tools#13155) doc: point to read_dipole (mne-tools#13149) [pre-commit.ci] pre-commit autoupdate (mne-tools#13152) BUG: Fix bug with not short-circuiting n_jobs=1 (mne-tools#13147) FIX: Missing coordinates.xml in MFF file (mne-tools#13148) FIX: Gracefully handle bad XML files in EGI reader (mne-tools#13145) Fixes for Latest IPython (9.0.1) (mne-tools#13146) Fix intersphinx (mne-tools#13143) BUG: Fix bug with parallel doc build (mne-tools#13140) [pre-commit.ci] pre-commit autoupdate (mne-tools#13141) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a few MFF files which contain a corrupt XML file (a tag didn't close properly).
This PR uses defensive programming to gracefully handle the scenario, while also providing more information to the user about the XML file that couldn't be parsed.
on main (crashes and doesn't give a hint)
this branch: