-
Notifications
You must be signed in to change notification settings - Fork 36
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
plotsr error #39
Comments
Hi Sanzhen, Are you trying to run this through a terminal or from something like Jupyter? There is some discussion about this error arising when trying to plot in Jupyter/Google Colab python environment. QuantEcon/MatchingMarkets.py#1 So, I am wondering is the same thing happening here, or it is happening when you run this script directly from bash. |
plotsr was run in terminals using bash commands. I have tested it in both CentOS and Ubuntu systems. Let me know if more information is needed. |
Thanks for the information. Could you please try to edit the plotsr script and change the line:
to
Here, I just try to force matplotlib to use the correct plotting backend. Hopefully, it would work correctly after this. However, it is difficult to be sure as this seems to be an environment issue. If this does not work, then could you also please try to open your python console and run:
and let me know the output. Also, what version of matplotlib are you using? |
matplotlib 3.0.0 was used. |
Did it work after adding those two lines? |
And what was the output of |
'agg' |
I am working on that. Will update the result later. |
Not familiar with Python. some error occurred after modifying the script: File "syri/syri/bin/plotsr", line 155 |
Ok. In that case, please try with this version of plotsr https://github.com/schneebergerlab/syri/blob/V1.3/syri/bin/plotsr |
Thank Manish. But the problem remains. Traceback (most recent call last): |
That's not good.
I would expect that this would give the same error again. If so, then we can be sure that this is an environment issue. Maybe, you can also try deleting and reinstalling matplotlib. Unfortunately, I am out of better ideas right now. I would try to find a solution and would let you know if I find something helpful. |
My lab member Ha Le suggested using "cario" rather than "Qt5Agg" as the matplotlib backend. It solved the problem. I have successfully produced the figure. Thanks a lot for your time and rapid responses. |
That's great. Thanks for sharing the solution. |
I was able to run syri successfully but plotsr returned an error. It would be nice to see how you visualize the result. Please help if you know the potential problem. Thanks.
Here is the code
Here is the error:
syri/lib/python3.5/site-packages/matplotlib/font_manager.py:229: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
'Matplotlib is building the font cache using fc-list. '
Traceback (most recent call last):
File "syri/bin/plotsr", line 154, in
plt.switch_backend('Qt5Agg')
File "syri/lib/python3.5/site-packages/matplotlib/pyplot.py", line 221, in switch_backend
newbackend, required_framework, current_framework))
ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework, as 'headless' is currently running
The text was updated successfully, but these errors were encountered: