Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 19th, 2003, 12:09 PM
Digital39 Digital39 is offline
VA Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Virginia/San Diego (Soon)
Posts: 48 Digital39 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 36 m 53 sec
Reputation Power: 6
Send a message via ICQ to Digital39 Send a message via AIM to Digital39 Send a message via Yahoo to Digital39
wxPython + py2exe = probs for me

Hey all,

I started leaning python this morning and I am unable to run my compiled gui applications. I have had no problems running the compiled command line applications. The error msgs I get are the following

Before putting the resource file in the directory after compile
---------------------------------------------------------------------------------------
test-app:128: UserWarning: PyCrust has been renamed to Py. Use 'from wx import py'
Traceback (most recent call last):
File "<string>", line 116, in ?
File "PythonCardPrototype\model.pyc", line 202, in __init__
File "PythonCardPrototype\res.pyc", line 45, in __init__
File "PythonCardPrototype\util.pyc", line 30, in readAndEvalFile
IOError: [Errno 2] No such file or directory: 'test-app.rsrc.py'


After putting the resource file in the directory after compile
---------------------------------------------------------------------------------------
test-app:128: UserWarning: PyCrust has been renamed to Py. Use 'from wx import py'
Traceback (most recent call last):
File "<string>", line 116, in ?
File "PythonCardPrototype\model.pyc", line 202, in __init__
File "PythonCardPrototype\res.pyc", line 48, in getResource
File "PythonCardPrototype\res.pyc", line 86, in __init__
File "PythonCardPrototype\res.pyc", line 91, in __init__
File "PythonCardPrototype\res.pyc", line 91, in __init__
File "PythonCardPrototype\res.pyc", line 96, in __init__
File "PythonCardPrototype\res.pyc", line 130, in enforceSpec
File "PythonCardPrototype\res.pyc", line 30, in loadComponentModule
ImportError: cannot import module 'gauge


I searched through all the python code for 'import pycrust" and I did not see where I should change that, but I am not situated with python enough to know what the problems are related to the other errors. Any help is greatly appreciated.

- Pete

Reply With Quote
  #2  
Old October 19th, 2003, 04:05 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
The reason you can't find any referance to the PyCrust module in you're program is it's not being imported by your program (at least not directly), instead somewhere in one of the modules (in the wx library) you've imported uses it ..

Anyway i'd think very carefully before you start renaming parts of this these modules , you'll probably end up in way over your head!

Mark.
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old October 19th, 2003, 04:21 PM
Digital39 Digital39 is offline
VA Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Virginia/San Diego (Soon)
Posts: 48 Digital39 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 36 m 53 sec
Reputation Power: 6
Send a message via ICQ to Digital39 Send a message via AIM to Digital39 Send a message via Yahoo to Digital39
I searched the Python directory for the line that says to import the pycrust module, and all the of references were 'from wx import py' i never found a 'from wx import pycrust' so unless it is in a compiled part of the module i dont see how it can tell me to change it when it doesnt exist. Any ideas why I am getting the other errors tho?

Thanks

Reply With Quote
  #4  
Old October 19th, 2003, 04:39 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
To be honest i have no idea why your getting any errors at all - i was just saying that just because your not importing it directly doesn't mean it isn't being used - i've used wxPython with Py2exe and i've never had a problem getting it to compile..

What version of Python/Py2exe/wxPython are you using?

Mark.

Reply With Quote
  #5  
Old October 19th, 2003, 04:58 PM
Digital39 Digital39 is offline
VA Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Virginia/San Diego (Soon)
Posts: 48 Digital39 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 36 m 53 sec
Reputation Power: 6
Send a message via ICQ to Digital39 Send a message via AIM to Digital39 Send a message via Yahoo to Digital39
I installed py2exe 0.4.2, Python 2.3, and wxPython 2.4.2.4

The application will compile fine, only errors i get when compiling are importing some modules, but I read that is standard or normal because they are placed in one of the dlls. These errors are only happening when I actually run the application.

Reply With Quote
  #6  
Old October 19th, 2003, 05:11 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Does your program work before you try compile it with Py2exe? Or are you saying that you have an exe, but you're getting an error message when you run it? If it worked before then at least we know the problem is to do with Py2exe! Python programs themselves dont need to be compiled..

Mark.

Reply With Quote
  #7  
Old October 19th, 2003, 05:18 PM
Digital39 Digital39 is offline
VA Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Virginia/San Diego (Soon)
Posts: 48 Digital39 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 36 m 53 sec
Reputation Power: 6
Send a message via ICQ to Digital39 Send a message via AIM to Digital39 Send a message via Yahoo to Digital39
the program works fine before it is compiled, it is only after it is compiled that I have problems. It isn't a need since the script can run without being compiled I would just like to be able to if I needed to. Py2exe works fine as long as it doesnt need the wxPython modules

Reply With Quote
  #8  
Old October 19th, 2003, 05:30 PM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
Mmmm, sorry Digit i have no idea.. i've compiled a basic wxPython app before with no problems so it's a little comfusing that you cant!

You could try forcing Py2exe to include the modules but i dont know if this will work, you can find out a little more about this ("Flags to include or exclude modules or packages") on Py2exe's homepage (http://starship.python.net/crew/theller/py2exe/)

Mark.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > wxPython + py2exe = probs for me


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway