Error in atexit._run_exitfuncs

I am running matplotlib 1.3.1 under Ubuntu 13 and python3.
Everything works fine, but I get this message every time:

  Error in atexit._run_exitfuncs:
  AttributeError: 'FigureManagerGTK3Cairo' object has no attribute 'canvas'

What does it mean, and how do I stop it?

Keith

What it means, specifically, is that one (or more) figure objects still in memory at the time of exiting the python interpretor are missing the expected canvas attribute. I see this happen in various backends from time to time. The best I can figure is that somehow, the destructor for the figure has already been called (as it should), which should eliminate its “FigureManager” instance, but for some reason, that figure manager is still around and its destructor finally tries to destroy the canvas, which is already gone.

It is really an odd bug, and I am fairly certain my diagnostic isn’t quite right because I never was able to make a SSCE for testing/debugging/traceback purposes. The closest I was able to get was with a preliminary version of the animation framework Ryan May and I were working on a few years back. His code was holding some extra references, while destroying other objects… it was weird.

Sorry, I don’t have any solutions for you. Maybe someone else will.

Ben Root

···

On Wed, Jun 25, 2014 at 8:29 AM, <keith.briggs@…644…> wrote:

I am running matplotlib 1.3.1 under Ubuntu 13 and python3.

Everything works fine, but I get this message every time:

Error in atexit._run_exitfuncs:

AttributeError: ‘FigureManagerGTK3Cairo’ object has no attribute ‘canvas’

What does it mean, and how do I stop it?

Keith


Open source business process management suite built on Java and Eclipse

Turn processes into business applications with Bonita BPM Community Edition

Quickly connect people, data, and systems into organized workflows

Winner of BOSSIE, CODIE, OW2 and Gartner awards

http://p.sf.net/sfu/Bonitasoft


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I am still getting this error, this time with matplotlib.pyplot.matshow, and
I do not get any plot. This bug really needs to be fixed!

···

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-tp43566p43947.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Can you provide a minimal example that will trigger the bug?

From the description you have given we don't have enough information

to diagnose the problem.

Ben thinks this is related to some long-standing issues, if you could
help us track them down it would be greatly appreciated.

Tom

···

On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <keith.briggs@...644...> wrote:

I am still getting this error, this time with matplotlib.pyplot.matshow, and
I do not get any plot. This bug really needs to be fixed!

--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-tp43566p43947.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Thomas Caswell
tcaswell@...287...

How's this for minimal?

from matplotlib import pyplot as plt
plt.matshow([[0.0]])

It crashes with the FigureManagerGTK3Cairo error.
Keith

···

-----Original Message-----
From: Thomas Caswell [mailto:tcaswell@…287…]
Sent: 15 September 2014 13:23
To: Briggs,KM,Keith,TUB2 R
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs

Can you provide a minimal example that will trigger the bug?

From the description you have given we don't have enough information to diagnose the problem.

Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated.

Tom

On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <keith.briggs@...644...> wrote:

I am still getting this error, this time with matplotlib.pyplot.matshow, and
I do not get any plot. This bug really needs to be fixed!

--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-
tp43566p43947.html Sent from the matplotlib - users mailing list
archive at Nabble.com.

----------------------------------------------------------------------
--------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce Perforce version control.
Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.
clktrk _______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Thomas Caswell
tcaswell@...287...

What versions of things are you using (python, mpl, gtk, gtk's python
bindings, and cairo) and how did you install them?

Can you also include the full backtrace?

···

On Mon, Sep 15, 2014 at 8:28 AM, <keith.briggs@...644...> wrote:

How's this for minimal?

from matplotlib import pyplot as plt
plt.matshow([[0.0]])

It crashes with the FigureManagerGTK3Cairo error.
Keith

-----Original Message-----
From: Thomas Caswell [mailto:tcaswell@…287…]
Sent: 15 September 2014 13:23
To: Briggs,KM,Keith,TUB2 R
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs

Can you provide a minimal example that will trigger the bug?

From the description you have given we don't have enough information to diagnose the problem.

Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated.

Tom

On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <keith.briggs@...644...> wrote:

I am still getting this error, this time with matplotlib.pyplot.matshow, and
I do not get any plot. This bug really needs to be fixed!

--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-
tp43566p43947.html Sent from the matplotlib - users mailing list
archive at Nabble.com.

----------------------------------------------------------------------
--------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce Perforce version control.
Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.
clktrk _______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Thomas Caswell
tcaswell@...287...

--
Thomas Caswell
tcaswell@...287...

python 3.3.2, everything else is whatever Ubuntu 14.04 amd64 uses in its latest updates.

kbriggs:~> cat bug.py
#!/usr/bin/env python3
from matplotlib import pyplot as plt
plt.matshow([[0.0]])

kbriggs:~> ./bug.py
Error in atexit._run_exitfuncs:
AttributeError: 'FigureManagerGTK3Cairo' object has no attribute 'canvas'

···

________________________________________
From: Thomas Caswell [tcaswell@...287...]
Sent: 15 September 2014 13:38
To: Briggs,KM,Keith,TUB2 R
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs

What versions of things are you using (python, mpl, gtk, gtk's python
bindings, and cairo) and how did you install them?

Can you also include the full backtrace?

On Mon, Sep 15, 2014 at 8:28 AM, <keith.briggs@...644...> wrote:

How's this for minimal?

from matplotlib import pyplot as plt
plt.matshow([[0.0]])

It crashes with the FigureManagerGTK3Cairo error.
Keith

-----Original Message-----
From: Thomas Caswell [mailto:tcaswell@…287…]
Sent: 15 September 2014 13:23
To: Briggs,KM,Keith,TUB2 R
Cc: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] Error in atexit._run_exitfuncs

Can you provide a minimal example that will trigger the bug?

From the description you have given we don't have enough information to diagnose the problem.

Ben thinks this is related to some long-standing issues, if you could help us track them down it would be greatly appreciated.

Tom

On Mon, Sep 15, 2014 at 7:19 AM, keithbriggs <keith.briggs@...644...> wrote:

I am still getting this error, this time with matplotlib.pyplot.matshow, and
I do not get any plot. This bug really needs to be fixed!

--
View this message in context:
http://matplotlib.1069221.n5.nabble.com/Error-in-atexit-run-exitfuncs-
tp43566p43947.html Sent from the matplotlib - users mailing list
archive at Nabble.com.

----------------------------------------------------------------------
--------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce Perforce version control.
Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.
clktrk _______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Thomas Caswell
tcaswell@...287...

--
Thomas Caswell
tcaswell@...287...

kbriggs:~/Downloads/matplotlib-1.4.3> python3 setup.py build

···

============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.4.3]
                python: yes [3.4.0 (default, Apr 11 2014, 13:05:11) [GCC
                        4.8.2]]
              platform: yes [linux]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.8.2]
                   six: yes [using six version 1.5.2]
              dateutil: yes [dateutil was not found. It is required for date
                        axis support. pip/easy_install may attempt to
                        install it after matplotlib.]
                  pytz: yes [pytz was not found. pip will attempt to install
                        it after matplotlib.]
               tornado: yes [tornado was not found. It is required for the
                        WebAgg backend. pip/easy_install may attempt to
                        install it after matplotlib.]
             pyparsing: yes [using pyparsing version 2.0.1]
                 pycxx: yes [Official versions of PyCXX are not compatible
                        with matplotlib on Python 3.x, since they lack
                        support for the buffer object. Using local copy]
                libagg: yes [pkg-config information for 'libagg' could not
                        be found. Using local copy.]
Traceback (most recent call last):
  File "setup.py", line 155, in <module>
    result = package.check()
  File "/home/kbriggs/Downloads/matplotlib-1.4.3/setupext.py", line 961, in check
    min_version='2.3', version=version)
  File "/home/kbriggs/Downloads/matplotlib-1.4.3/setupext.py", line 445, in _check_for_pkg_config
    if (not is_min_version(version, min_version)):
  File "/home/kbriggs/Downloads/matplotlib-1.4.3/setupext.py", line 173, in is_min_version
    return found_version >= expected_version
  File "/usr/lib/python3.4/distutils/version.py", line 76, in __ge__
    c = self._cmp(other)
  File "/usr/lib/python3.4/distutils/version.py", line 343, in _cmp
    if self.version < other.version:
TypeError: unorderable types: str() < int()