473,672 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Py2Exe PROBLEM

Lad
I try to make an exe file from my script with help of Py2exe but I am
not successfull.
I have my script
start.py that has only one command

###############
import rgs.py
##############

(rgs.py is the real program.)

I use the following setup script:
############### ############### ###
from distutils.core import setup
import py2exe

setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = "0.5.0",
description = "py2exe sample script",
name = "py2exe samples",

# targets to build
windows = ["start.py"],
console=["start.py"]
)
############### ############
When compilation finishes I get:

The following modules appear to be missing
['blackbox', 'timing', 'rgs.py']

Can you please help me how to solve the problem?
Thank you
LAd
Jul 18 '05 #1
5 2614
Lad wrote:
I try to make an exe file from my script with help of Py2exe but I am
not successfull. .... When compilation finishes I get:

The following modules appear to be missing
['blackbox', 'timing', 'rgs.py']

Can you please help me how to solve the problem?


If you explain what problem you are actually having.

Are you assuming simply because of that warning message that
it didn't work? What happens when you try to run the resulting
..exe file?

Note that py2exe will sometimes complain about modules that
are not actually required for the program to run.

Also please explain what "blackbox" and "timing" are, if
they are part of the problem.

Finally (and this might be the whole problem), you seem
to be using "import rgs.py" when you really meant to use
just "import rgs". You don't import Python modules using
the full filename of the source file...

-Peter
Jul 18 '05 #2
Lad
Peter Hansen <pe***@engcorp. com> wrote in message news:<2t******* *************@p owergate.ca>...
Lad wrote:
I try to make an exe file from my script with help of Py2exe but I am
not successfull.

...
When compilation finishes I get:

The following modules appear to be missing
['blackbox', 'timing', 'rgs.py']

Can you please help me how to solve the problem?


If you explain what problem you are actually having.

Are you assuming simply because of that warning message that
it didn't work? What happens when you try to run the resulting
.exe file?

Note that py2exe will sometimes complain about modules that
are not actually required for the program to run.

Also please explain what "blackbox" and "timing" are, if
they are part of the problem.

Finally (and this might be the whole problem), you seem
to be using "import rgs.py" when you really meant to use
just "import rgs". You don't import Python modules using
the full filename of the source file...

-Peter


Dear Peter,
Thank you for your help.
Yes, I changed import rgs.py to import rgs but I still receive
The following modules appear to be missing
['blackbox', 'timing', 'rgs.py']


When I try to start the exe file I get

Traceback (most recent call last):
File "rgs.pyc", line 561, in OnFileHistory

File "pickle.pyc ", line 1390, in load
File "pickle.pyc ", line 872, in load
File "pickle.pyc ", line 985, in load_string
LookupError: unknown encoding: string-escape

Can you please help again?
Lad
Jul 18 '05 #3
Lad wrote:
Peter Hansen <pe***@engcorp. com> wrote in message news:<2t******* *************@p owergate.ca>...
Also please explain what "blackbox" and "timing" are, if
they are part of the problem.
Yes, I changed import rgs.py to import rgs but I still receive
>>The following modules appear to be missing['blackbox', 'timing', 'rgs.py']
Again, what are "blackbox" and "timing"? Just two modules
which rgs.py imports, or something else entirely?
When I try to start the exe file I get

Traceback (most recent call last):
File "rgs.pyc", line 561, in OnFileHistory

File "pickle.pyc ", line 1390, in load
File "pickle.pyc ", line 872, in load
File "pickle.pyc ", line 985, in load_string
LookupError: unknown encoding: string-escape

Can you please help again?


Somebody will generally help, whether me or others...

The above actually looks like you might not be using
the right version of something. Try running the same
version of python that you used to generate the py2exe'd
file and type the following in it:
r'tes\t'.decode ('string-escape')


(Yes, just as I did there... complete with r and \t )

Does it give the same error? If it does, then you
probably don't have Python 2.3 installed...

In any case, if you can't figure it out, post the version
of Python and py2exe that you are using. Also make
sure you have fully tested the application *before* running
py2exe on it, so you'll know whether the problem involves
py2exe or not.

Note that based on what you are showing, there is now nothing
wrong with your py2exe setup: it generated a .exe and you
can run it. The fact that it is failing points to a different
problem, not py2exe.

-Peter
Jul 18 '05 #4
Lad wrote:
Peter Hansen <pe***@engcorp. com> wrote in message news:<2t******* *************@p owergate.ca>...
Lad wrote:

I try to make an exe file from my script with help of Py2exe but I am
not successfull.


...
When compilation finishes I get:

The following modules appear to be missing
['blackbox', 'timing', 'rgs.py']

Can you please help me how to solve the problem?


If you explain what problem you are actually having.

Are you assuming simply because of that warning message that
it didn't work? What happens when you try to run the resulting
.exe file?

Note that py2exe will sometimes complain about modules that
are not actually required for the program to run.

Also please explain what "blackbox" and "timing" are, if
they are part of the problem.

Finally (and this might be the whole problem), you seem
to be using "import rgs.py" when you really meant to use
just "import rgs". You don't import Python modules using
the full filename of the source file...

-Peter

Dear Peter,
Thank you for your help.
Yes, I changed import rgs.py to import rgs but I still receive
>>The following modules appear to be missing['blackbox', 'timing', 'rgs.py']

When I try to start the exe file I get

Traceback (most recent call last):
File "rgs.pyc", line 561, in OnFileHistory

File "pickle.pyc ", line 1390, in load
File "pickle.pyc ", line 872, in load
File "pickle.pyc ", line 985, in load_string
LookupError: unknown encoding: string-escape

Can you please help again?
Lad


You need to add "encodings" to the list of packages that you manually
include (the option is called packages I think) - see the py2exe wiki

David
Jul 18 '05 #5
Lad
> >
Dear Peter,
Thank you for your help.
Yes, I changed import rgs.py to import rgs but I still receive
>>The following modules appear to be missing['blackbox', 'timing', 'rgs.py']

When I try to start the exe file I get

Traceback (most recent call last):
File "rgs.pyc", line 561, in OnFileHistory

File "pickle.pyc ", line 1390, in load
File "pickle.pyc ", line 872, in load
File "pickle.pyc ", line 985, in load_string
LookupError: unknown encoding: string-escape

Can you please help again?
Lad


You need to add "encodings" to the list of packages that you manually
include (the option is called packages I think) - see the py2exe wiki

David


Thank you Peter and David for your time to help.
Now the script starts but still it does not run as good as under
Python.
In fact it gets stuck( hangs) and I do not know exactly where.Is there
a method how to find out where it hanged?

In my program I import the following modules:

from _winreg import *
from wxPython.wx import *
import locale,base64,u rllib2,shutil,o s.path,timeouts ocket,fnmatch,z ipfile,thread,r andom,mimetools ,threading,urll ib,string,urlpa rse,httplib,
re,os,webbrowse r,time,strptime ,glob,pickle,sm tplib,nntplib,C onfigParser,sys

Is there any known problem with any of those moduls running with
Py2exe?
I use
PythonWin 2.3.4 (#53, May 25 2004)
WxPython 2.4.1.2
Thanks
Lad.
Jul 18 '05 #6

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

Similar topics

0
2983
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out "import numarray" allows the exe to run. Left in, I get "4.exe has generated errors" etc. I'm going around and around and there isn't much on Google. py2exe output is last.
2
3352
by: Stefan Behrens | last post by:
Hi, does anybody know how I can get py2exe to work with wxPython's wxCalendarCtrl? Currently, I have just a "standard" setup.py, and py2exe gives me a syntax error. Do I need to include any special extension and how? Below is the output I get as well as a small demo app to reproduce the problem.
0
1709
by: Kathleen Kudzma | last post by:
I'm having a problem with py2exe for Python 2.3. I got fixed the Lookuperror no codec search functions registered: can't find encoding by following the instructions on the py2exe page (added -packages encodings --force-imports encodings). This resolved the codec error. When I tried to create an exe with py2exe I still got the following warnings. Please see the new error I got (after warnings). ...
8
4731
by: Kathleen Kudzma | last post by:
Does anyone know how to resolve the following problem that I'm getting in Python 2.2 and 2.3? PROBLEM: When I try to create a classReader object I get an exception: "SAXReaderNotAvailable: No parsers found". This only happens when I run the ..EXE; it does not happen if I run the .PY file. When I'm running the .EXE this exception doesn't happen immediately. It happens as soon as I try to create a classReader object. Please see the...
5
4018
by: Rene Olsthoorn | last post by:
Dear readers, py2exe has a problem including libxml2. Not at building time, but at runtime. The libxml2.dll cannot be loaded... Is there anyone that NOT has the problem? (and can you drop me your setup.py scipt, please). Thanks in advance, Rene O.
6
3942
by: Luc Saffre | last post by:
Hello, I had a strange problem when freezing (using either py2exe or McMillan installer) a script that imports reportlab (which imports PIL (which imports FixTk))). - Python 2.3.3c (also with Python 2.3) - PIL 1.1.4 - Installer or py2exe : latest versions.
2
2677
by: Kylotan | last post by:
I need to be able to build Py2Exe from the source code as I am making a Windows executable where I wish to preprocess the modules before importing them.It looks like I can do this by adding lines to Load_Module() in py2exe's start.c. However problem I have is that I can't build Py2Exe using the instructions provided. Using the designated command of "python setup.py install" I get this error: Traceback (most recent call last): File...
4
4003
by: bwaha | last post by:
First time trying to create an executable with py2exe. I have a small program which makes use of python23 (2.3.5?), wxpython ('2.6.2.1'), matplotlib ('0.83.2'), win32com (latest?), Numeric ('23.7') on Windows XP & Win2000. The program runs without problem but as an exe it doesn't even get to showing the GUI. I get the following error log when I run the executable. Traceback (most recent call last): File "mpival3.py", line 1264, in ?
1
2348
by: Dave Lim | last post by:
>On May 3, 1:29 pm, Dave Lim <diband... at yahoo.com> wrote: site:http://surguy.net/articles/speechrecognition.xml used out tried ? to protection aroundhttp://mail.yahoo.com I went and
0
8404
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
8828
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
8608
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
8680
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7446
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...
1
6238
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2819
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
2063
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.