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
no 'ch_names' in annotations -> Error #99
Comments
Thanks for the report, this is indeed possible if your annotations were somehow created before the |
Sure, I'll try to get to it today or tomorrow. |
great, please make sure to read: https://github.com/bids-standard/pybv/blob/main/.github/CONTRIBUTING.md especially the part about pre-commit hooks. :-) |
thanks for the hint. Do I have to do something specific (ie., going beyond what is explicitely mentioned in |
the hooks are included here: https://github.com/bids-standard/pybv/blob/main/.pre-commit-config.yaml you get them automatically when cloning the repo and running |
That's my first shot. Feel free to refactor/feedback.
|
what do you mean by Also, note how in your PR I edited the "description" to |
sorry, that should have been Here's the traceback: Traceback
sry, going to for lunch now. :) back in 30. And thanks for the hint with |
no worries -- but I also don't know what Lines 500 to 511 in 1a29f74
Apparently the And the real issue is here: Line 440 in 1a29f74
and here: Line 485 in 1a29f74
I think the fix would be to pull this whole chunk: Lines 498 to 508 in 1a29f74
... out of the loop and place it already above here: Line 440 in 1a29f74
(with proper logic so that only stimulus and response events are considered) TLDR; this is a separate bug that we need to fix. thanks for the report! I'll take care of this one ... your #100 can be merged regardless of this, once you have updated the changelog and added yourself to the authors file. |
👍 great. btw, with |
ahhh, thanks 🤦♂️ makes sense! |
thx, yes, I'm on it. 1 sec |
@sappelhoff I think, I'm finally done. Thx for the quick support. |
thanks @eioe! -- could you checkout the |
Yep, looks good. Also no other problems now. |
I'm using pybv (v0.7.4) via MNE (v1.1.1) to concatenate and rewrite raw BV files.
It raises a
Key error: ch_names
and stops. It seems the culprit is here in _export.py.I checked my raw file in MNE, and its annotations do indeed not contain an entry for
ch_names
. Did not dig deeper into the MNE code to find out whatch_names
mean in the context of annotations (not directly obvious to me).Is that an issue with my files or could _export.py check for the existence of the key first and skip it if not present (dunno if this will break things downstream)?
The text was updated successfully, but these errors were encountered: