Skip to content

Conversation

@Gabrock94
Copy link
Contributor

Reference issue

Fixes #11434.

What does this implement/fix?

The code verifies is annotations exists (not type None) before attempting to fetch the length of the annotations' object.

Additional information

Missing annotations is probably caused by mne.concatenate_epochs(). Fixing the function will avoid having None type annotations. However I am not sure that's the only case, as such this fix may help in more than a situation.

@Gabrock94 Gabrock94 requested a review from sappelhoff as a code owner January 30, 2023 17:26
@welcome
Copy link

welcome bot commented Jan 30, 2023

Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

@agramfort
Copy link
Member

@Gabrock94 ok for you?

@Gabrock94
Copy link
Contributor Author

@agramfort I tried it with both my dataset and the sample dataset and it seems to work. I've been able to correctly export from MNE and import it in a different software so I would say at least in my case it worked.

Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
@larsoner larsoner added this to the 1.4 milestone Feb 2, 2023
@drammock
Copy link
Member

@agramfort if you have time this weekend this would be a good PR to see why tests are failing.

@agramfort agramfort enabled auto-merge (squash) February 25, 2023 11:29
@agramfort agramfort merged commit 32b686c into mne-tools:main Feb 25, 2023
@welcome
Copy link

welcome bot commented Feb 25, 2023

🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪

larsoner added a commit to larsoner/mne-python that referenced this pull request Mar 1, 2023
* upstream/main: (264 commits)
  BUG: Fix deprecated API usage in example (mne-tools#11512)
  Deprecate 'kind' and 'path' in favor of 'fname' in the layout reader (mne-tools#11500)
  EGI/MFF events outside EEG recording should not break the code (mne-tools#11505)
  fixed annotations error on export (mne-tools#11435)
  DOC: Update installer links [skip azp] [skip actions] [skip cirrus] (mne-tools#11506)
  BUG: updates for MPL 3.7 compatibility (mne-tools#11409)
  Fix docstrings by replacing str with path-like and fix double backticks for formatting (mne-tools#11499)
  Use pathlib.Path instead of os.path to handle files and folders [circle deploy] (mne-tools#11473)
  MAINT: Fix Circle [circle deploy] (mne-tools#11497)
  MAINT: Use mamba in CIs (mne-tools#11471)
  Updating documentation to clarify full vs half-bandwidth and defaults in time_frequency.multitaper.py (mne-tools#11479)
  Fix typo in tutorial (mne-tools#11498)
  Typo fix and added colons before code (mne-tools#11496)
  [MRG] ENH/DOC: demo custom spectrum creation (mne-tools#11493)
  Accept only left-clicks for adding annotations (mne-tools#11491)
  [BUG, MRG] Fix pial surface loading, logging in locate_ieeg (mne-tools#11489)
  [ENH] Added unit_role to add non-breaking space between magnitude  and units (mne-tools#11469)
  MAINT: Fix CircleCI build (mne-tools#11488)
  [DOC] Updated decoding.SSD documentation and internal variable naming (mne-tools#11475)
  Typo fix (mne-tools#11485)
  ...
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.

Exporting epochs is not working if epochs have been concatenated

5 participants