-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
brain.screenshot(time_viewer=True) crash #9336
Comments
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽♂️ |
I'm guessing this is some sort of off-by-one error as:
@GuillaumeFavelier can you look? |
I added it in the list, I'll fix it ASAP. |
Thanks @GuillaumeFavelier! I don't want to be pushy, but if you could kindly move this up on your priorities list this would be most appreciated :) I'm working with @crsegerie and unfortunately this bug is currently a blocker in his project. Let me know if there's any way I can help you track this down! Happy to have a call too. 🤗 |
Yep. It would be most appreciated! And props to @hoechenberger who first isolated the bug |
I'm trying to reproduce so I downloaded
|
Also, as a way to mitigate since it's a blocker, does it work if you change the |
@crsegerie Can you share the STC for the right hemisphere too? Both are needed here |
Yes @GuillaumeFavelier, if I add size=(500, 500) in the stc.plot, the bug disappears ! |
I like your enthusiasm :) For me, it's still there in a corner case of |
Here is the right hemisphere : https://drive.google.com/file/d/1y7puZ7RPMGV6uB6tN_Pu-MgamuaAFvlb/view?usp=sharing (In the script only left hemisphere is imported ? Weird, but ok...) |
Yeah, MNE tries to automatically find the other hemisphere. It's a bit odd, yes… |
Thanks for sharing. I still cannot reproduce locally but I'll try to simulate this scenario anyway and come up with a fix eventually. About the origin of the issue itself, it's not clear so I can only guess here. Reasons why the trace plot would not have the correct size could be either unexpected DPI configuration or PyQt5 inconsistencies on Windows for example. |
@GuillaumeFavelier yes I also suspected some kind of hi-DPI interaction @crsegerie can you check if you have any of those settings for high-resolution displays activated? |
I checked my graphic settings, but did not find any anomalies. |
if it is more convenient for you, we can arrange a meeting if you want to explore my debugger on VS Code? |
@GuillaumeFavelier So the default |
Probably this, or something similar. My guess is that there is a situation where the sizes reported are inconsistent, or we don't use them correctly, and that whether or not this situation occurs depends on the size itself and/or interactions with the window (resizes, etc.). So trying different |
Thanks @larsoner! I just realized that @crsegerie switched from |
IIRC an |
Ok. I've tested (500, 500), 500, (800, 800), and 800 and it's not a matter of tuple not tuple... Only the 500 are working |
You mean |
Only the size matter, not the tuple |
OK. 500 working, 600 working, 799 working, 800 not working, 801 not working |
Can you see if you can reproduce with a simple example using
For me I get:
Can you tell me if this works for you at 500 and 800? And if one or both of them succeed, what the Also, what is your screen resolution? And can you tell me if this prints something other than 1.:
|
There is a small typo inital_time > initial_time. For me the code works for both 500 and 800. For 500 I obtain : (667, 500, 3) My screen resolution : 1920x1080. When I run the tests, I get 1. |
So the only difference is my 667 and your 669 |
I was running the mne-bids-pipeline (so with mne-23dev cloned from GitHub in backend), but a bug appeared just after the creation of the reports of the first subject. After investigation, it turns out that the bug comes from MNE, from the option time_viewer=True in the screenshot method. By setting it to false, the image plots nicely.
I tried to make a reproducible example with sample data, but this does not reproduce the issue (Else). So I've also included here the (IF True) my stc file and my subjects file which isolate the code on my computer.
Expected results
An interactive plot.
Actual results
When I run the code, the figure appears one second and then crashes
Additional information
I'm working on Windows.
The text was updated successfully, but these errors were encountered: