Skip to content

Fix Nonetype has no attribute SetVisibility in _coreg.py #13209

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

Closed
wants to merge 3 commits into from

Conversation

psyxw
Copy link
Contributor

@psyxw psyxw commented Apr 13, 2025

What does this implement/fix?

For some CTF data, when passing inst='/path/to/fif' to mne.gui.coregistration(inst=inst), it will prompt "Nonetype has no attribute SetVisibility". This is because actors list contain None. A solution is to judge if actor in actors is None. (or using try-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 :)

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).
Copy link

welcome bot commented Apr 13, 2025

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

@larsoner
Copy link
Member

larsoner commented Apr 15, 2025

Interesting... I wonder why you don't have any actors. Does the coreg GUI actually work for you?

In any case, no problem to protect against None here I suppose. Could you add a line to doc/changes/devel/13209.bugfix.rst (see that dir for other examples) using the

:newcontrib:`Wei ...`

and add your name to doc/changes/names.inc? That way you can get credit in our changelog

@larsoner larsoner added this to the 1.10 milestone Apr 15, 2025
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.

2 participants