Discussion:
[Matplotlib-users] Fwd: bug report
Bobby Wilkins
2015-09-16 09:35:58 UTC
Permalink
OS: Windows 8.1 Pro

matplotlib version: 1.4.3

where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/

customizations: none

Sample Program: attached py file; this is a Physics homework problem; I
have the answers I need, but would like to fix the errors to be able to
label all lines.

Debug output in attached output.txt file

If you uncomment line 180, the error is reported as if it came from that
line even though there is no float64 on that line (savefig). If commented,
it does not report a line from my .py file...

If you make line 170 read as follows, the error goes away:

if (maxTerm<32):

This suggests to me that the additional labels for the 32, 64, 128, and 154
term runs is what is triggering the bug, but I cannot figure out what it
is.

Also, separate note, just about any time I make figures, when closing the
last figure I get a python.exe app crash and this message:

alloc: invalid block: 00000000044E7680: 0 d


Thank you for any help,
Bobby
Benjamin Root
2015-09-16 13:43:31 UTC
Permalink
What version of numpy do you have installed?
Post by Bobby Wilkins
OS: Windows 8.1 Pro
matplotlib version: 1.4.3
where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
customizations: none
Sample Program: attached py file; this is a Physics homework problem; I
have the answers I need, but would like to fix the errors to be able to
label all lines.
Debug output in attached output.txt file
If you uncomment line 180, the error is reported as if it came from that
line even though there is no float64 on that line (savefig). If commented,
it does not report a line from my .py file...
This suggests to me that the additional labels for the 32, 64, 128, and
154 term runs is what is triggering the bug, but I cannot figure out what
it is.
Also, separate note, just about any time I make figures, when closing the
alloc: invalid block: 00000000044E7680: 0 d
Thank you for any help,
Bobby
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Benjamin Root
2015-09-16 13:50:02 UTC
Permalink
Btw, I can't reproduce the problem using matplotlib master, numpy master
and linux. I know it isn't at all similar to your setup, but it is a data
point.
Post by Benjamin Root
What version of numpy do you have installed?
Post by Bobby Wilkins
OS: Windows 8.1 Pro
matplotlib version: 1.4.3
where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
customizations: none
Sample Program: attached py file; this is a Physics homework problem; I
have the answers I need, but would like to fix the errors to be able to
label all lines.
Debug output in attached output.txt file
If you uncomment line 180, the error is reported as if it came from that
line even though there is no float64 on that line (savefig). If commented,
it does not report a line from my .py file...
This suggests to me that the additional labels for the 32, 64, 128, and
154 term runs is what is triggering the bug, but I cannot figure out what
it is.
Also, separate note, just about any time I make figures, when closing the
alloc: invalid block: 00000000044E7680: 0 d
Thank you for any help,
Bobby
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Sterling Smith
2015-09-16 15:39:18 UTC
Permalink
Works fine for

{{{
: python
Python 2.7.10 (default, Sep 15 2015, 11:26:42)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
/Users/smithsp/.pyhistory
import matplotlib
matplotlib.__version__
'1.4.3'
import numpy
numpy.__version__
'1.9.2'
matplotlib.get_backend()
u’MacOSX'
}}}

All are obtained through MacPorts on OSX 10.9.5.

-Sterling
Btw, I can't reproduce the problem using matplotlib master, numpy master and linux. I know it isn't at all similar to your setup, but it is a data point.
What version of numpy do you have installed?
OS: Windows 8.1 Pro
matplotlib version: 1.4.3
where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
customizations: none
Sample Program: attached py file; this is a Physics homework problem; I have the answers I need, but would like to fix the errors to be able to label all lines.
Debug output in attached output.txt file
If you uncomment line 180, the error is reported as if it came from that line even though there is no float64 on that line (savefig). If commented, it does not report a line from my .py file...
This suggests to me that the additional labels for the 32, 64, 128, and 154 term runs is what is triggering the bug, but I cannot figure out what it is.
alloc: invalid block: 00000000044E7680: 0 d
Thank you for any help,
Bobby
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Bobby Wilkins
2015-09-17 13:46:40 UTC
Permalink
Thank you all.

I am using Python 3.4.3.

I meant to include a pip list:

Assimulo (2.8)
decorator (4.0.2)
gmpy2 (2.0.7)
ipykernel (4.0.3)
ipython (4.0.0)
ipython-genutils (0.1.0)
ipywidgets (4.0.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter-client (4.0.0)
jupyter-core (4.0.4)
MarkupSafe (0.23)
matplotlib (1.4.3)
mistune (0.7.1)
nbconvert (4.0.0)
nbformat (4.0.0)
nose (1.3.7)
notebook (4.0.4)
numpy (1.9.2)
pandas (0.16.2)
path.py (8.1)
pickleshare (0.5)
pip (7.1.2)
Pygments (2.0.2)
pyparsing (2.0.3)
pyreadline (2.0)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
requests (2.7.0)
scipy (0.16.0)
setuptools (18.2)
simplegeneric (0.8.1)
six (1.9.0)
sympy (0.7.6)
testpath (0.2)
tornado (4.2.1)
traitlets (4.0.0)

So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
problem? Let me try to install Python 2.7 tonight and see what that does.
Post by Sterling Smith
Works fine for
{{{
: python
Python 2.7.10 (default, Sep 15 2015, 11:26:42)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
/Users/smithsp/.pyhistory
Post by Benjamin Root
import matplotlib
matplotlib.__version__
'1.4.3'
Post by Benjamin Root
import numpy
numpy.__version__
'1.9.2'
Post by Benjamin Root
matplotlib.get_backend()
u’MacOSX'
}}}
All are obtained through MacPorts on OSX 10.9.5.
-Sterling
Post by Benjamin Root
Btw, I can't reproduce the problem using matplotlib master, numpy master
and linux. I know it isn't at all similar to your setup, but it is a data
point.
Post by Benjamin Root
What version of numpy do you have installed?
OS: Windows 8.1 Pro
matplotlib version: 1.4.3
where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
customizations: none
Sample Program: attached py file; this is a Physics homework problem; I
have the answers I need, but would like to fix the errors to be able to
label all lines.
Post by Benjamin Root
Debug output in attached output.txt file
If you uncomment line 180, the error is reported as if it came from that
line even though there is no float64 on that line (savefig). If commented,
it does not report a line from my .py file...
Post by Benjamin Root
This suggests to me that the additional labels for the 32, 64, 128, and
154 term runs is what is triggering the bug, but I cannot figure out what
it is.
Post by Benjamin Root
Also, separate note, just about any time I make figures, when closing
alloc: invalid block: 00000000044E7680: 0 d
Thank you for any help,
Bobby
------------------------------------------------------------------------------
Post by Benjamin Root
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Post by Benjamin Root
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140_______________________________________________
Post by Benjamin Root
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Christoph Gohlke
2015-09-17 17:30:30 UTC
Permalink
I can reproduce the AttributeError on all Python versions and the crash
(in Python's _tkinter.pyd extension) on Python 3.4.

As a workaround you might try to upgrade to matplotlib 1.5, which seems
to work for me.

Christoph
Post by Bobby Wilkins
Thank you all.
I am using Python 3.4.3.
Assimulo (2.8)
decorator (4.0.2)
gmpy2 (2.0.7)
ipykernel (4.0.3)
ipython (4.0.0)
ipython-genutils (0.1.0)
ipywidgets (4.0.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter-client (4.0.0)
jupyter-core (4.0.4)
MarkupSafe (0.23)
matplotlib (1.4.3)
mistune (0.7.1)
nbconvert (4.0.0)
nbformat (4.0.0)
nose (1.3.7)
notebook (4.0.4)
numpy (1.9.2)
pandas (0.16.2)
path.py (8.1)
pickleshare (0.5)
pip (7.1.2)
Pygments (2.0.2)
pyparsing (2.0.3)
pyreadline (2.0)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
requests (2.7.0)
scipy (0.16.0)
setuptools (18.2)
simplegeneric (0.8.1)
six (1.9.0)
sympy (0.7.6)
testpath (0.2)
tornado (4.2.1)
traitlets (4.0.0)
So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
problem? Let me try to install Python 2.7 tonight and see what that does.
Works fine for
{{{
: python
Python 2.7.10 (default, Sep 15 2015, 11:26:42)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
/Users/smithsp/.pyhistory
import matplotlib
matplotlib.__version__
'1.4.3'
import numpy
numpy.__version__
'1.9.2'
matplotlib.get_backend()
u’MacOSX'
}}}
All are obtained through MacPorts on OSX 10.9.5.
-Sterling
Btw, I can't reproduce the problem using matplotlib master, numpy master and linux. I know it isn't at all similar to your setup, but it is a data point.
What version of numpy do you have installed?
OS: Windows 8.1 Pro
matplotlib version: 1.4.3
where obtained:http://www.lfd.uci.edu/~gohlke/pythonlibs/
<http://www.lfd.uci.edu/%7Egohlke/pythonlibs/>
customizations: none
Sample Program: attached py file; this is a Physics homework problem; I have the answers I need, but would like to fix the errors to be able to label all lines.
Debug output in attached output.txt file
If you uncomment line 180, the error is reported as if it came from that line even though there is no float64 on that line (savefig). If commented, it does not report a line from my .py file...
This suggests to me that the additional labels for the 32, 64, 128, and 154 term runs is what is triggering the bug, but I cannot figure out what it is.
alloc: invalid block: 00000000044E7680: 0 d
Thank you for any help,
Bobby
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Bobby Wilkins
2015-09-18 06:23:03 UTC
Permalink
I installed CPython 2.7.10, and the appropriate versions of the same
packages, and I still get the same error:

[c:\python\dev\homework1] pip list
backports.ssl-match-hostname (3.4.0.2)
certifi (2015.9.6.2)
decorator (4.0.2)
functools32 (3.2.3.post2)
ipykernel (4.0.3)
ipyparallel (4.0.2)
ipython (4.0.0)
ipython-genutils (0.1.0)
ipywidgets (4.0.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.0.0)
jupyter-console (4.0.2)
jupyter-core (4.0.5)
MarkupSafe (0.23)
matplotlib (1.4.3)
mistune (0.7.1)
nbconvert (4.0.0)
nbformat (4.0.0)
notebook (4.0.4)
numpy (1.9.2)
path.py (8.1.1)
pickleshare (0.5)
Pillow (2.9.0)
pip (7.1.2)
Pygments (2.0.2)
pyparsing (2.0.3)
pyreadline (2.1)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
qtconsole (4.0.0)
scipy (0.16.0)
setuptools (18.3)
simplegeneric (0.8.1)
six (1.9.0)
tornado (4.2.1)
traitlets (4.0.0)

Note: the program does not error if last "if" in the source reads:

if (maxTerm<32)#: or ((myFigBase<4) and (maxTerm<64)):

If I change it to something like this:

if (maxTerm<32) or ((myFigBase<4) and (maxTerm<64)):

... I get the below error:

[c:\python\dev\homework1] python PHYS404-homework1-problem3-rev05.py
Traceback (most recent call last):
File "PHYS404-homework1-problem3-rev05.py", line 196, in <module>
graphMyetoNegX(mySlices,myRuns,0,1,0)
File "PHYS404-homework1-problem3-rev05.py", line 185, in graphMyetoNegX

plt.savefig(figStrName+str(myFigBase*3+3).zfill(2)+figStrExt,bbox_inches='tight')
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 577, in
savefig
res = fig.savefig(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 1476, in
savefig
self.canvas.print_figure(*args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line
2158, in print_figure
**kwargs)
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
line 521, in print_png
FigureCanvasAgg.draw(self)
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
line 469, in draw
self.figure.draw(self.renderer)
File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 59, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 1085, in
draw
func(*args)
File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 59, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\axes\_base.py", line 2110,
in draw
a.draw(renderer)
File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 59, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "C:\Python27\lib\site-packages\matplotlib\text.py", line 642, in draw
ismath=ismath, mtext=mtext)
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
line 206, in draw_text
font.get_image(), np.round(x - xd), np.round(y + yd) + 1, angle, gc)
File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line
2648, in round_
return round(decimals, out)
File "C:\Python27\lib\site-packages\numpy\ma\core.py", line 4903, in round
result._mask = self._mask
AttributeError: 'numpy.float64' object has no attribute '_mask'
Post by Bobby Wilkins
Thank you all.
I am using Python 3.4.3.
Assimulo (2.8)
decorator (4.0.2)
gmpy2 (2.0.7)
ipykernel (4.0.3)
ipython (4.0.0)
ipython-genutils (0.1.0)
ipywidgets (4.0.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter-client (4.0.0)
jupyter-core (4.0.4)
MarkupSafe (0.23)
matplotlib (1.4.3)
mistune (0.7.1)
nbconvert (4.0.0)
nbformat (4.0.0)
nose (1.3.7)
notebook (4.0.4)
numpy (1.9.2)
pandas (0.16.2)
path.py (8.1)
pickleshare (0.5)
pip (7.1.2)
Pygments (2.0.2)
pyparsing (2.0.3)
pyreadline (2.0)
python-dateutil (2.4.2)
pytz (2015.4)
pyzmq (14.7.0)
requests (2.7.0)
scipy (0.16.0)
setuptools (18.2)
simplegeneric (0.8.1)
six (1.9.0)
sympy (0.7.6)
testpath (0.2)
tornado (4.2.1)
traitlets (4.0.0)
So, if the program works for Python 2.7 but not 3.4.3, maybe that is the
problem? Let me try to install Python 2.7 tonight and see what that does.
Post by Sterling Smith
Works fine for
{{{
: python
Python 2.7.10 (default, Sep 15 2015, 11:26:42)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
/Users/smithsp/.pyhistory
Post by Benjamin Root
import matplotlib
matplotlib.__version__
'1.4.3'
Post by Benjamin Root
import numpy
numpy.__version__
'1.9.2'
Post by Benjamin Root
matplotlib.get_backend()
u’MacOSX'
}}}
All are obtained through MacPorts on OSX 10.9.5.
-Sterling
Post by Benjamin Root
Btw, I can't reproduce the problem using matplotlib master, numpy
master and linux. I know it isn't at all similar to your setup, but it is a
data point.
Post by Benjamin Root
What version of numpy do you have installed?
OS: Windows 8.1 Pro
matplotlib version: 1.4.3
where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/
customizations: none
Sample Program: attached py file; this is a Physics homework problem; I
have the answers I need, but would like to fix the errors to be able to
label all lines.
Post by Benjamin Root
Debug output in attached output.txt file
If you uncomment line 180, the error is reported as if it came from
that line even though there is no float64 on that line (savefig). If
commented, it does not report a line from my .py file...
Post by Benjamin Root
This suggests to me that the additional labels for the 32, 64, 128, and
154 term runs is what is triggering the bug, but I cannot figure out what
it is.
Post by Benjamin Root
Also, separate note, just about any time I make figures, when closing
alloc: invalid block: 00000000044E7680: 0 d
Thank you for any help,
Bobby
------------------------------------------------------------------------------
Post by Benjamin Root
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Post by Benjamin Root
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140_______________________________________________
Post by Benjamin Root
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Bobby Wilkins
2015-09-18 06:32:39 UTC
Permalink
One more note: changing the plot type from loglog to just plot, the errors
also go away.
Post by Bobby Wilkins
I installed CPython 2.7.10, and the appropriate versions of the same
Bobby Wilkins
2015-09-18 07:02:34 UTC
Permalink
Thank you Christoph, and thank you for the extensive package builds!

I did update to matplotlib 1.5 and it seems to address the error; I get all
of my plots and they look correct, though I did get the following warning
on Python 2.7.10:

[c:\python\dev\homework1] python PHYS404-homework1-problem3-rev05.py
C:\Python27\lib\site-packages\numpy\core\fromnumeric.py:2648:
RuntimeWarning: invalid value encountered in rint
return round(decimals, out)

... and the same on CPython 3.4 (do you think 3.5 is stable enough to move
to?):

[c:\python\dev\homework1] python PHYS404-homework1-problem3-rev05.py
C:\Python34\lib\site-packages\numpy\core\fromnumeric.py:2648:
RuntimeWarning: invalid value encountered in rint
return round(decimals, out)

Many thanks again,
Bobby

On Thu, Sep 17, 2015 at 11:23 PM, <
1. Re: bug report (Christoph Gohlke)
2. Re: bug report (Bobby Wilkins)
----------------------------------------------------------------------
Message: 1
Date: Thu, 17 Sep 2015 10:30:30 -0700
Subject: Re: [Matplotlib-users] bug report
Content-Type: text/plain; charset=windows-1252; format=flowed
I can reproduce the AttributeError on all Python versions and the crash
(in Python's _tkinter.pyd extension) on Python 3.4.
As a workaround you might try to upgrade to matplotlib 1.5, which seems
to work for me.
Christoph
Continue reading on narkive:
Loading...