Skip to content
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

WebAgg fails to start on Windows 7 with v1.4.2 #4036

Closed
blink1073 opened this issue Jan 25, 2015 · 2 comments
Closed

WebAgg fails to start on Windows 7 with v1.4.2 #4036

blink1073 opened this issue Jan 25, 2015 · 2 comments

Comments

@blink1073
Copy link
Member

I am using:

  • Anaconda Python 2.7.8 64 bit
  • Matplotlib 1.4.2
  • Firefox 34, IE 11

I tried running this code:

import matplotlib
matplotlib.use('webagg')
import numpy as np
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(np.random.rand(10))


def onkeyevent(event):
    fig.suptitle('%s: %s' % (event.name, event.key))
    fig.canvas.draw()

cid = fig.canvas.mpl_connect('key_press_event', onkeyevent)
cid = fig.canvas.mpl_connect('key_release_event', onkeyevent)
plt.show()

I get the error:

Press Ctrl+C to stop WebAgg server
ERROR:tornado.application:Uncaught exception in /1/ws
Traceback (most recent call last):
  File "C:\Users\silvester\Anaconda\lib\site-packages\tornado\websocket.py", lin
e 369, in _run_callback
    callback(*args, **kwargs)
  File "C:\Users\silvester\Anaconda\lib\site-packages\matplotlib\backends\backen
d_webagg.py", line 229, in on_message
    manager.handle_json(message)
  File "C:\Users\silvester\Anaconda\lib\site-packages\matplotlib\backends\backen
d_webagg_core.py", line 426, in handle_json
    self.canvas.handle_event(content)
  File "C:\Users\silvester\Anaconda\lib\site-packages\matplotlib\backends\backen
d_webagg_core.py", line 244, in handle_event
    self.draw()
  File "C:\Users\silvester\Anaconda\lib\site-packages\matplotlib\backends\backen
d_webagg_core.py", line 142, in draw
    self.manager.refresh_all()
  File "C:\Users\silvester\Anaconda\lib\site-packages\matplotlib\backends\backen
d_webagg_core.py", line 430, in refresh_all
    diff = self.canvas.get_diff_image()
  File "C:\Users\silvester\Anaconda\lib\site-packages\matplotlib\backends\backen
d_webagg_core.py", line 199, in get_diff_image
    self._png_buffer)
IndexError: Unexpected SeqBase<T> length.

I would have been using the development version but I could not get matplotlib-winbuild to work (separate issue)....

@blink1073
Copy link
Member Author

I think my Anaconda was borked, I'm nuking it and starting over.

@blink1073
Copy link
Member Author

False alarm, it works with a clean install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant