<p dir="auto">Hello,</p>
<p dir="auto">The simple python program:</p>
<p dir="auto">import matplotlib.pyplot as plt</p>
<p dir="auto">numbers = [1,2,3,4,5]<br>
plt.plot(numbers)<br>
plt.show()</p>
<p dir="auto">returns the following exception instead of drawing a picture. I'm using debian-testing and python 2.7.11-2 with:</p>
<p dir="auto">dpkg -l python-matplotlib</p>
<p dir="auto">ii  python-matplotlib                       1.5.3-1                  i386                     Python based plotting system in a style similar to Matlab</p>
<p dir="auto">$ python test_overflowerror.py<br>
Exception in Tkinter callback<br>
Traceback (most recent call last):<br>
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1545, in <strong>call</strong><br>
return self.func(*args)<br>
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 283, in resize<br>
self.show()<br>
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 355, in draw<br>
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)<br>
File "/usr/lib/python2.7/dist-packages/matplotlib/backends/tkagg.py", line 26, in blit<br>
_tkagg.tkinit(tk.interpaddr(), 1)<br>
OverflowError: Python int too large to convert to C long</p>
<p dir="auto">Regards, Karol</p>
<p dir="auto">To help us understand and resolve your issue please check that you have provided<br>
the information below.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)</li>
</ul>
<p dir="auto">Platform: Debian Testing, using the python 2.7 (2.7.11-2 when I first started seeing this, just upgraded to 2.7.13rc1 but the problem still exists). I have this problem with the 1.5.3 on debian testing, but I also tried a virtualenv with pip install --pre matplotlib, which pulled in 2.0.0rc1, and I see the same problem.</p>
<p dir="auto">Debian stable, with matplotlib 1.4.2, works fine, as did Debian testing until recently.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> How did you install Matplotlib and Python (pip, anaconda, from source ...)</li>
</ul>
<p dir="auto">See above: Debian package and virtualenv.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If possible please supply a <a href="http://sscce.org/" rel="nofollow">Short, Self Contained, Correct, Example</a><br>
that demonstrates the issue i.e a small piece of code which reproduces the issue<br>
and can be run with out any other (or as few as possible) external dependencies.</li>
</ul>
<p dir="auto">Minimal test program:</p>
<p dir="auto">import pylab</p>
<p dir="auto">distances = [0, 0.0011970407617050934, 0.0050796062254631295, 0.007303941153223762, 0.007303941153223762, 0.008232870398475445, 0.008232870398475445, 0.012806461740481582, 0.016651523629144134, 0.021047330616832543]<br>
elevations = [6404.2, 6410.76, 6400.92, 6410.76, 6423.88, 6423.88, 6453.41, 6410.76, 6427.17, 6420.6]<br>
pylab.plot(distances, elevations)<br>
pylab.show()</p>
<p dir="auto">(Please let me know if you want a non-pylab example. I see it with straight matplotlib too.)</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If this is an image generation bug attach a screenshot demonstrating the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> If this is a regression (Used to work in an earlier version of Matplotlib), please<br>
note where it used to work.</li>
</ul>
<p dir="auto">It worked as recently as a month ago on Debian testing, but sorry, I don't know what matplotlib version that was since I didn't know it was going to stop working.</p>