8000 Error in WebAgg When "S" Key is Pressed · Issue #3966 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Error in WebAgg When "S" Key is Pressed #3966
Closed
@blink1073

Description

@blink1073

I am using IPython 2.3.1 and ab549ac. To reproduce, run IPython and %paste the code below. Click on the figure and then press the 'S' key. The traceback below is printed and the figure becomes unresponsive.

import matplotlib
import itertools
import numpy as np
matplotlib.use('webagg')
import matplotlib.pyplot as plt
plt.close('all')
fig, ax = plt.subplots()
x = np.linspace(0,10,10000)
y = np.sin(x)
ln, = ax.plot(x,y)
evt = []
colors = iter(itertools.cycle(['r', 'g', 'b', 'k', 'c']))
def on_event(event):
    evt.append(event)
    ln.set_color(next(colors))
    fig.canvas.draw()
    fig.canvas.draw_idle()
fig.canvas.mpl_connect('button_press_event', on_event)
plt.show()
ERROR:tornado.application:Uncaught exception in /1/ws
Traceback (most recent call last):
  File "/home/silvester/anaconda/lib/python3.4/site-packages/tornado/websocket.py", line 369, in _run_callback
    callback(*args, **kwargs)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backends/backend_webagg.py", line 230, in on_message
    manager.handle_json(message)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backends/backend_webagg_core.py", line 361, in handle_json
    self.canvas.handle_event(content)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backends/backend_webagg_core.py", line 219, in handle_event
    self.key_press_event(key)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backend_bases.py", line 1837, in key_press_event
    self.callbacks.process(s, event)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/cbook.py", line 534, in process
    proxy(*args, **kwargs)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/cbook.py", line 415, in __call__
    return mtd(*args, **kwargs)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backend_bases.py", line 2597, in key_press
    key_press_handler(event, self.canvas, self.canvas.toolbar)
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backend_bases.py", line 2490, in key_press_handler
    toolbar.save_figure()
  File "/home/silvester/workspace/matplotlib/lib/matplotlib/backend_bases.py", line 3155, in save_figure
    raise NotImplementedError
NotImplementedError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0