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

TclError in TkAgg with version 2.2.0rc1 #10479

Closed
ImportanceOfBeingErnest opened this Issue Feb 15, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@ImportanceOfBeingErnest
Contributor

ImportanceOfBeingErnest commented Feb 15, 2018

Running the following minimal code in version 2.2.0rc1 (on windows 8.1, python 2.7)

import matplotlib
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt
print matplotlib.__version__ # 2.2.0rc1

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1,2,3], [1,3,1])

plt.show()

produces a TclError: error reading data, expected ptr height width:

Exception in Tkinter callback
Traceback (most recent call last):
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\lib-tk\Tkinter.py", line 1536, in __call__
    return self.func(*args)
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 228, in resize
    self.draw()
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 300, in draw
    tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\matplotlib\backends\tkagg.py", line 34, in blit
    dataptr, colormode, bboxptr)
TclError: error reading data, expected ptr height width
Exception in Tkinter callback
Traceback (most recent call last):
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\lib-tk\Tkinter.py", line 1536, in __call__
    return self.func(*args)
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\lib-tk\Tkinter.py", line 587, in callit
    func(*args)
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 320, in idle_draw
    self.draw()
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 300, in draw
    tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File "c:\winpython\winpython-64bit-2.7.10.3\python-2.7.10.amd64\lib\site-packages\matplotlib\backends\tkagg.py", line 34, in blit
    dataptr, colormode, bboxptr)
TclError: error reading data, expected ptr height width

Note that the error appears twice. A figure window is opened, but is empty:

image

The same code using Qt4Agg runs fine.

[I installed the the rc1 as matplotlib‑2.2.0rc1‑cp27‑cp27m‑win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs]

@tacaswell tacaswell added this to the v2.2.0 milestone Feb 15, 2018

@tacaswell tacaswell added the GUI/tk label Feb 15, 2018

@tacaswell

This comment has been minimized.

Member

tacaswell commented Feb 15, 2018

This is likely due to #9356

attn @mattip

@QuLogic

This comment has been minimized.

Member

QuLogic commented Feb 17, 2018

Should be fixed by #10486.

@QuLogic QuLogic closed this Feb 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment