-
Notifications
You must be signed in to change notification settings - Fork 191
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
Assertion error when using backend="ipywidgets" indicating to set %matplotlib widget
#3236
Comments
In your script did you run We likely added an extra check for users to help them make sure the widgets would work. But we need to diagnose if that check is buggy :) |
%matplotlib widget
Yes, I use the |
How did you do your new install? (Also we just released 0.101.0 today if you want to upgrade to that--but there is one big API change there ). |
I did the installation using the |
That should definitely work. But yeah if you're willing to install the new release with: pip install spikeinterface[full,widgets] specifying widgets is important to allow use of all backends. |
I installed the new version. If I run the But still, I have the same error. The installation was done using the |
And where and how are you running your script? I have tried install from source with the widget and it worked a month ago.. |
Right now, I'm running the script in VS Code Jupyter notebook. But I also ran it in Jupyter notebook alone too and had the same problem. Interestingly, I don't think the problem is Jupyter or the ipywidgets installation since I have tried some basic tutorials using the ipywidgets library and they seem to work fine. |
I confirm that I can reproduce the error: %matplotlib widget
from spikeinterface.core import generate_recording
recording = generate_recording(durations=[10.0])
from spikeinterface.widgets import plot_traces
plot_traces(recording, backend="ipywidgets", mode='line', channel_ids=recording.channel_ids[:8]) |
Fix in #3238 If any of you two guys want to keep the torch on that one and figure out what's going on it would be great. The patch is working though. |
Changing |
I can reproduce the error on Linux, but not on Mac. With
on both. |
Hi. Any solution to this issue yet? I am having the same issue with version 101 and %matplotlib ipympl also don't work. I was about to write an issue about this but found this issue on time. |
Should be fixed on the main branch. |
@h-mayorquin my version of fixing it was removing the environment, redownloading the full_spikeinterface_environment_windows.yml file, creating the environment with that (instead of using pip), and running check_your_install.py and cleanup_for_windows.py. Then using "%matplotlib ipympl". |
Mmm if you use the version from github just pip install . -U in the pertinent environment should work. But I am glad you solved your problem! |
If I run the following code in SI version 0.100.7, it works fine, but in versions 0.100.8 or 0.101.0rc1, it doesn't.
Here is the code running in the VS Code Jupyter Notebook on a Windows 11 computer:
%matplotlib widget
si.plot_traces(raw_rec, backend="ipywidgets", mode='line', channel_ids=raw_rec.channel_ids[:8])
This gives the following error:
---> 13 assert "ipympl" in mpl_backend, "To use the 'ipywidgets' backend, you have to set %matplotlib widget"
AssertionError: To use the 'ipywidgets' backend, you have to set %matplotlib widget
The problem is only with
backend="ipywidgets"
, while using other options likebackend="ephyviewer"
works fine.The text was updated successfully, but these errors were encountered: