473,698 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Py2exe error messages

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

C:\Python22>pyt hon setup.py py2exe --icon EXE icon
Traceback (most recent call last):
File "setup.py", line 7, in ?
scripts = ["wxApp1.py"],
File "C:\Python22\di stutils\core.py ", line 101, in setup
_setup_distribu tion = dist = klass(attrs)
File "C:\Python22\di stutils\dist.py ", line 130, in __init__
setattr(self, method_name, getattr(self.me tadata, method_name))
AttributeError: DistributionMet adata 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********@hotm ail.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 3405
"Ray" <su*******@hotm ail.com> wrote in message news:<ma******* *************** **************@ python.org>...
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Python22>pyt hon setup.py py2exe --icon EXE icon
Traceback (most recent call last):
File "setup.py", line 7, in ?
scripts = ["wxApp1.py"],
File "C:\Python22\di stutils\core.py ", line 101, in setup
_setup_distribu tion = dist = klass(attrs)
File "C:\Python22\di stutils\dist.py ", line 130, in __init__
setattr(self, method_name, getattr(self.me tadata, method_name))
AttributeError: DistributionMet adata 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 = DistributionMet adata()
for basename in self.metadata._ METHOD_BASENAME S:
method_name = "get_" + basename
setattr(self, method_name, getattr(self.me tadata, 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._M ETHOD_BASENAMES (in the same file).

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

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

_METHOD_BASENAM ES = ("name", "version", "author", "author_ema il",
"maintainer ", "maintainer_ema il", "url",
"license", "descriptio n", "long_descripti on",
"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
5226
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 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: 1063, The service process could not connect to the...
6
2123
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 .py file ok, but once it's inside a py2exe generated exe.. no working. The error in the event log is: The description for Event ID ( 240 ) in Source ( MyService ) cannot be found. The local computer may not have the necessary registry...
10
4019
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 windows gui? TIA Al
1
553
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
2242
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 --packages encodings This is how the .po-file looks like:
6
1766
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 autostart. When something is wrong (in example, I'm not connected to the net), it opens a window with some information about error and exact location where I can find log. How can I get rid of this window? I'd like to have a log file, but I don't...
1
2313
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 (http://pyopengl.sourceforge.net/documentation/py2exe.html) I've put PyOpenGL package to a directory where my program was placed. and run the script: setup.py py2exe --excludes=OpenGL
17
3419
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 installation. Console and Windows (GUI) applications, windows NT services, exe and dll COM servers are supported. Changes in this release:
2
1880
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: Adding zlib.pyd to C:\tests\CanControllerTest\New Folder
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9027
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7725
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.