[Pythonmac-SIG] Py2app/Python 3.1 error

Dan Ross dan at rosspixelworks.com
Fri Jan 7 16:12:59 CET 2011


 Has anyone seen this before?

 Traceback (most recent call last):
   File "setup.py", line 18, in <module>
     setup_requires=['py2app'],
   File
 "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/core.py",
 line 110, in setup
     _setup_distribution = dist = klass(attrs)
   File
 "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/setuptools/dist.py",

 line 225, in __init__
     _Distribution.__init__(self,attrs)
   File
 "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py",
 line 263, in __init__
     self.finalize_options()
   File
 "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/setuptools/dist.py",

 line 258, in finalize_options
     ep.load()(self, ep.name, value)
   File
 "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/pkg_resources.py",

 line 1954, in load
     entry = __import__(self.module_name, globals(),globals(),
 ['__name__'])
   File
 "/Users/danr/.local/lib/python3.1/site-packages/py2app/build_app.py",
 line 28, in <module>
     from modulegraph.find_modules import find_modules, parse_mf_results
   File
 "/Users/danr/.local/lib/python3.1/site-packages/modulegraph/find_modules.py",
 line 21, in <module>
     from . import modulegraph
   File
 "/Users/danr/.local/lib/python3.1/site-packages/modulegraph/modulegraph.py",
 line 31, in <module>
     from . import util
   File
 "/Users/danr/.local/lib/python3.1/site-packages/modulegraph/util.py",
 line 69, in <module>
     cookie_re = re.compile(B("coding[:=]\s*([-\w.]+)"))
   File
 "/Users/danr/.local/lib/python3.1/site-packages/modulegraph/compat.py",
 line 12, in B
     return value.decode('latin1')
 AttributeError: 'str' object has no attribute 'decode'

 It's a simple little app using tkinter.

 I'm using ActiveState's Python 3.1 if that makes a difference.

 Thanks,

 Dan





More information about the Pythonmac-SIG mailing list