matplotlib-terminal
matplotlib-terminal copied to clipboard
plt.show() locking error
Always getting lock error no matter which show I use
>>> plt.show("block")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/casper/dev/notebooks/.venv/lib/python3.12/site-packages/matplotlib/pyplot.py", line 607, in show
return _get_backend_mod().show(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/casper/dev/notebooks/.venv/lib/python3.12/site-packages/matplotlib_terminal/backend.py", line 128, in show
manager.canvas.print_terminal(rendering=rendering)
File "/home/casper/dev/notebooks/.venv/lib/python3.12/site-packages/matplotlib_terminal/backend.py", line 109, in print_terminal
self.draw(rendering=rendering)
File "/home/casper/dev/notebooks/.venv/lib/python3.12/site-packages/matplotlib_terminal/backend.py", line 61, in draw
with self.renderer.lock:
^^^^^^^^^^^^^^^^^^
Funny I was just looking up because of the exact same issue. Python 3.11, matplotlib 3.8.4
The exact cause of the error is:
AttributeError: 'MyRenderer' object has no attribute 'lock'
Very cool project, thanks.
Funny I was just looking up because of the exact same issue. Python 3.11, matplotlib 3.8.4 The exact cause of the error is:
AttributeError: 'MyRenderer' object has no attribute 'lock'Very cool project, thanks.
Same.
Has anyone found a solution?
I found a workaround: use an older version of matplotlib (3.5.3 works in my case)