-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix Nonetype has no attribute SetVisibility in _coreg.py [reopen of #13209] #13218
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
Conversation
For some CTF data, when passing inst='/path/to/fif' to mne.gui.coregistration(), it will prompt "Nonetype has no attribute SetVisibility", because actors list contain [None]. A solution is to judge if actor in actors is None. (or using try-except).
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Can you share a data file that shows the problem? I tried:
and the GUI came up okay on |
Here is an info file. The info file is derived from OMEGA Dataset (CTF format). I read the data with |
Hmmm I cannot reproduce the issue on
Screencast.From.2025-04-18.09-37-37.mp4Is it possible this has already been fixed on |
Sound interesting... I clone MNE-python in the 20250422_144652.mp4 |
Okay, not sure why it happens for you and not for me but safe enough to add the change, merged |
🎉 Congrats on merging your first pull request! 🥳 Looking forward to seeing more from you in the future! 💪 |
What does this implement/fix?
For some CTF data, when passing
inst='/path/to/fif'
tomne.gui.coregistration(inst=inst)
, it will prompt "Nonetype
has no attributeSetVisibility
". This is because actors list containNone
. A solution is to judge if actor in actors isNone
. (or usingtry
-except
).I met this problem in mne-1.9.0 Windows 11 Python 3.12.10. I'm willing to provide related fif info file to reproduce the problem :)