#45379: py27-matplotlib: AttributeError: When using gi.repository you must not import static modules like "gobject". ------------------------------+-------------------- Reporter: rsearles@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.1 Resolution: | Keywords: Port: py27-matplotlib | ------------------------------+-------------------- Changes (by ryandesign@…): * priority: High => Normal * keywords: python => * owner: macports-tickets@… => sean@… * port: python27 @2.7.8_2+universal => py27-matplotlib Old description:
I'm getting a weird error from matplotlib. This script was a working scrip that I have used many times, and last week after updating all my port definitions, it broke and gave me this error. The trace is as follows:
Traceback (most recent call last): File "graphToolVisualization.py", line 13, in <module> from pylab import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pylab.py", line 274, in <module> from matplotlib.pyplot import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pyplot.py", line 103, in <module> _backend_selection() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pyplot.py", line 97, in _backend_selection if gobject.MainLoop().is_running(): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/gi/__init__.py", line 62, in __getattr__ raise AttributeError(_static_binding_error) AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183
I am using a MacBook Pro running OS X 10.9.5. My active python port is python27 @2.7.8_2+universal and this script was written for using graph- tool (which is a python package for network visualization). It depends on boost, so I am using boost @1.56.0_1+no_single+no_static+python27+universal and my graph-tool port (if that's relevant) is py27-graph-tool @2.2.35_0. Please help!
New description: I'm getting a weird error from matplotlib. This script was a working scrip that I have used many times, and last week after updating all my port definitions, it broke and gave me this error. The trace is as follows: {{{ Traceback (most recent call last): File "graphToolVisualization.py", line 13, in <module> from pylab import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pylab.py", line 274, in <module> from matplotlib.pyplot import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pyplot.py", line 103, in <module> _backend_selection() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/matplotlib/pyplot.py", line 97, in _backend_selection if gobject.MainLoop().is_running(): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/gi/__init__.py", line 62, in __getattr__ raise AttributeError(_static_binding_error) AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183 }}} I am using a MacBook Pro running OS X 10.9.5. My active python port is python27 @2.7.8_2+universal and this script was written for using graph- tool (which is a python package for network visualization). It depends on boost, so I am using boost @1.56.0_1+no_single+no_static+python27+universal and my graph-tool port (if that's relevant) is py27-graph-tool @2.2.35_0. Please help! -- -- Ticket URL: <https://trac.macports.org/ticket/45379#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X