473,322 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Py2exe error messages

Ray
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Python22>python setup.py py2exe --icon EXE icon
Traceback (most recent call last):
File "setup.py", line 7, in ?
scripts = ["wxApp1.py"],
File "C:\Python22\distutils\core.py", line 101, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python22\distutils\dist.py", line 130, in __init__
setattr(self, method_name, getattr(self.metadata, method_name))
AttributeError: DistributionMetadata instance has no attribute
'get___doc__'

This is the error message I'm getting when I try to run
This is my setup script:

from distutils.core import setup
import py2exe

setup(name = 'Notebook',
version = '0.1',
description = 'Simple Text Editor',
author = 'Ray Sleeper',
author_email = 's********@hotmail.com',
url = ' ',
scripts = ["wxApp1.py"],
I'm using Python2.2 and Boa0.2.3 if that helps
Why am I getting this error message?

Jul 18 '05 #1
1 3391
"Ray" <su*******@hotmail.com> wrote in message news:<ma************************************@pytho n.org>...
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Python22>python setup.py py2exe --icon EXE icon
Traceback (most recent call last):
File "setup.py", line 7, in ?
scripts = ["wxApp1.py"],
File "C:\Python22\distutils\core.py", line 101, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python22\distutils\dist.py", line 130, in __init__
setattr(self, method_name, getattr(self.metadata, method_name))
AttributeError: DistributionMetadata instance has no attribute
'get___doc__'

This is the error message I'm getting when I try to run


Hmmm. Have you taken a good look at the distutils/dist.py code?

On my 2.2.2 installation the nearest match (which strangely isn't
line exactly on line 130) is this chunk of code:

"""
# Store the distribution meta-data (name, version, author, and so
# forth) in a separate object -- we're getting to have enough
# information here (and enough command-line options) that it's
# worth it. Also delegate 'get_XXX()' methods to the 'metadata'
# object in a sneaky and underhanded (but efficient!) way.
self.metadata = DistributionMetadata()
for basename in self.metadata._METHOD_BASENAMES:
method_name = "get_" + basename
setattr(self, method_name, getattr(self.metadata, method_name))
"""

Don't know if I'm teach grandma to suck eggs here, but this
code it constructing a metadata sub-object and "stealing" certain
"get" functions from it to pass off as its own. The list of
attributes that it is prepared to get is taken from
Distribution._METHOD_BASENAMES (in the same file).

Looking at the version of this from my installation I see:

'''
class DistributionMetadata:
"""Dummy class to hold the distribution meta-data: name, version,
author, and so forth.
"""

_METHOD_BASENAMES = ("name", "version", "author", "author_email",
"maintainer", "maintainer_email", "url",
"license", "description", "long_description",
"keywords", "platforms", "fullname", "contact",
"contact_email", "licence")
'''

This leads to the question where is the loop in the extract above
getting the "__doc__" from that is using to build the method name?

You may want to inspect your the distutils code in your python installation
(and maybe put a few print statements into it) to investigate.

Hope this helps.
Regards,
Giles
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Brad Clements | last post by:
I'm trying to get a simple service to work with py2exe and python 2.3 I get this error when I start it (after registering it) The description for Event ID ( 240 ) in Source ( UMXWIN32SVC )...
6
by: Brad Clements | last post by:
Now that Thomas is back from vacation ;-) I cannot get the example service to work using Python 2.3 and the latest released py2exe (or the cvs version) on Win2k SP3. I can run the sample service...
10
by: achrist | last post by:
The py2exe says that a console app should have the --console option and a windows app should have the --windows option. What is the way to py2exe a python program that uses both console and...
1
by: Ray | last post by:
OK I'm clueless.. How do you run py2exe on windows, I've tried the dos prompt and get 'python not recognized', also tried python prompt and got a 'syntax error' message
3
by: F. GEIGER | last post by:
When I start a py2exe-ed application I get the error 'ascii' codec can't encode character u'\xe9' in position 10: ordinal not in range(128) This is how I run py2exe: setup.py py2exe -O1...
6
by: Krzysztof Ksi±¿ek | last post by:
Hi! As almost totally newbe, I have written a simple script and I'm proud of it ;-) It connects to ftp server and uploads some files. Kind of backup. I've compiled it with py2exe and put it in...
1
by: Kirill Kuvaldin | last post by:
Hello All! My program in python uses PyOpenGL and I need to convert it to a standalone windows executable file. Following to these instructions...
17
by: Thomas Heller | last post by:
py2exe 0.6.1 released ===================== py2exe is a Python distutils extension which converts python scripts into executable windows programs, able to run without requiring a python...
2
by: nikie | last post by:
When I try to compress the output of py2exe like this: from distutils.core import setup import py2exe setup(console=, options={"py2exe": {"compressed": 1}}) I get strange error messages: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.