Skip to content

FIX: read_annotations(.txt) on a single channel-specific annotation#13962

Merged
larsoner merged 3 commits into
mne-tools:mainfrom
pjdurka:fix-read-annotations-txt-single-channel
Jun 15, 2026
Merged

FIX: read_annotations(.txt) on a single channel-specific annotation#13962
larsoner merged 3 commits into
mne-tools:mainfrom
pjdurka:fix-read-annotations-txt-single-channel

Conversation

@pjdurka

@pjdurka pjdurka commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Claude Code found the bug while working on another project (IDE4EEG, gitlab, using MNE format and some functions) and proposed fix, which I submitted as an issue. Then I was asked in an email to create a pull request, which I hereby did, also with assistance from Claude Code.

Reference issue

Closes #13961

What does this implement/fix?

one-line change in annotations.py

for ci, ch in enumerate(ch_names)
->
for ci, ch in enumerate(np.atleast_1d(ch_names))

and test in test_annotations.py

— test passed locally.

@larsoner larsoner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks reasonable to me, thanks @pjdurka !

@larsoner larsoner enabled auto-merge (squash) June 15, 2026 18:20
@larsoner larsoner merged commit 0aecdf3 into mne-tools:main Jun 15, 2026
31 checks passed
@welcome

welcome Bot commented Jun 15, 2026

Copy link
Copy Markdown

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

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.

read_annotations raises AttributeError on a .txt file with a single channel-specific annotation

3 participants