Matplotlib Support
See original GitHub issueIs your feature request related to a problem? Please describe.
When I try to use matplotlib
with AREPL (which is a great vscode extension, thank you) I have this error thrown up, when it runs fine normally, I have run extensive tests.
TypeError: float() argument must be a string or a number, not '_NoValueType'
Describe the solution you’d like
I would like it if this error did not come up, and it just skipped, or even better, that it could show matplotlib
graphs inline in the editor.
Describe alternatives you’ve considered
- Console ASCII graphs
- Skip error and let rest of code run
Thank you to the AREPL team!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:32 (13 by maintainers)
Top Results From Across the Web
Matplotlib — Visualization with Python
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Matplotlib makes easy things easy and hard things ...
Read more >Matplotlib Pyplot - W3Schools
Pyplot. Most of the Matplotlib utilities lies under the pyplot submodule, and are usually imported under the plt alias: import matplotlib.pyplot as plt....
Read more >What Is Matplotlib In Python? How to use it for plotting?
Matplotlib is a cross-platform, data visualization and graphical plotting library for Python and its numerical extension NumPy.
Read more >Scientific mode | PyCharm Documentation - JetBrains
Scientific mode in PyCharm provides support for interactive scientific computing and data ... Plots tab for viewing Matplotlib charts.
Read more >Matplotlib - Wikipedia
Matplotlib 2.0.x supports Python versions 2.7 through 3.10. Python 3 support started with Matplotlib 1.2. Matplotlib 1.4 is the last version to support...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry about that, arepl doesn’t always work perfectly 😬
Can you post the code that reproduces the error please?
Ah, I think I understand the issue now. In hindsight it was fairly obvious what was happening, but the normally the syntax check method is never called so I kinda forgot about it 😅.
Here’s what is happening: AREPL ships with a setting called AREPL.pyGuiLibraries, which is a list of libraries that can create a GUI (a window that pops up). Matplotlib is one of those libraries. Whenever one of those libraries are imported restart mode is activated, where AREPL is restarted every run. This is so the GUI is killed and reloaded when you make code changes. Without restart mode, if you spawned a window, the python process would hang forever until the window was killed.
Before restarting I check the syntax. Unfortunately the syntax check method is using the wrong python path. I need to release a new version of AREPL that fixes this.
In the meantime you can fix it yourself with one of two ways:
C:\<your user>\.vscode\extensions\almenon.arepl-2.0.3\node_modules\python-shell\index.js
and change line 236 in checkSyntaxFile toconst pythonPath = "py"
.