473,706 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python freeze help

Hello everyone,

I'm trying to use python's freeze utility but I'm running into problems.
I called it like this :

python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py
~/Documents/Code/Python/src/jester/service.py -m jester

then I did : make

then I tried to run it : ./service

and I get this :

grossetti@deskt op-01:~/tmp/freeze$ ./service
Traceback (most recent call last):
File "/home/grossetti/Documents/Code/Python/src/jester/service.py",
line 16, in <module>
from jester import constants, utils
File "/home/grossetti/Documents/Code/Python/src/jester/utils.py", line
20, in <module>
from twisted.interne t.protocol import Protocol, ClientCreator
File "/usr/lib/python2.5/site-packages/twisted/internet/protocol.py",
line 17, in <module>
from zope.interface import implements
File "/usr/lib/python2.5/site-packages/zope/__init__.py", line 20, in
<module>
pkg_resources.d eclare_namespac e('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1749,
in declare_namespa ce
_handle_ns(pack ageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1719,
in _handle_ns
path = module.__path__ ; path.append(sub path)
AttributeError: 'str' object has no attribute 'append'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/apport_python_h ook.py", line
38, in apport_exceptho ok
from apport.packagin g_impl import impl as packaging
File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in
<module>
from apport.report import Report
File "/usr/lib/python2.5/site-packages/apport/report.py", line 20, in
<module>
from problem_report import ProblemReport
File "/usr/lib/python2.5/site-packages/problem_report. py", line 18, in
<module>
from email.MIMEMulti part import MIMEMultipart
File "/usr/lib/python2.5/email/__init__.py", line 79, in __getattr__
__import__(self .__name__)
ImportError: No module named multipart

Original exception was:
Traceback (most recent call last):
File "/home/grossetti/Documents/Code/Python/src/jester/service.py",
line 16, in <module>
from jester import constants, utils
File "/home/grossetti/Documents/Code/Python/src/jester/utils.py", line
20, in <module>
from twisted.interne t.protocol import Protocol, ClientCreator
File "/usr/lib/python2.5/site-packages/twisted/internet/protocol.py",
line 17, in <module>
from zope.interface import implements
File "/usr/lib/python2.5/site-packages/zope/__init__.py", line 20, in
<module>
pkg_resources.d eclare_namespac e('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1749,
in declare_namespa ce
_handle_ns(pack ageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1719,
in _handle_ns
path = module.__path__ ; path.append(sub path)
AttributeError: 'str' object has no attribute 'append'
Does anyone have any ideas as of why I get this?

Thank you,
Gabriel

Sep 23 '08 #1
2 2646
On Sep 23, 5:01*am, Gabriel Rossetti <gabriel.rosse. ..@arimaz.com>
wrote:
Hello everyone,

I'm trying to use python's freeze utility but I'm running into problems.
I called it like this :

python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py
~/Documents/Code/Python/src/jester/service.py -m jester

then I did : make

then I tried to run it : ./service

and I get this :

grossetti@deskt op-01:~/tmp/freeze$ ./service
Traceback (most recent call last):
* File "/home/grossetti/Documents/Code/Python/src/jester/service.py",
line 16, in <module>
* * from jester import constants, utils
* File "/home/grossetti/Documents/Code/Python/src/jester/utils.py", line
20, in <module>
* * from twisted.interne t.protocol import Protocol, ClientCreator
* File "/usr/lib/python2.5/site-packages/twisted/internet/protocol.py",
line 17, in <module>
* * from zope.interface import implements
* File "/usr/lib/python2.5/site-packages/zope/__init__.py", line 20, in
<module>
* * pkg_resources.d eclare_namespac e('zope')
* File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1749,
in declare_namespa ce
* * _handle_ns(pack ageName, path_item)
* File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1719,
in _handle_ns
* * path = module.__path__ ; path.append(sub path)
AttributeError: 'str' object has no attribute 'append'
Error in sys.excepthook:
Traceback (most recent call last):
* File "/usr/lib/python2.5/site-packages/apport_python_h ook.py", line
38, in apport_exceptho ok
* * from apport.packagin g_impl import impl as packaging
* File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in
<module>
* * from apport.report import Report
* File "/usr/lib/python2.5/site-packages/apport/report.py", line 20, in
<module>
* * from problem_report import ProblemReport
* File "/usr/lib/python2.5/site-packages/problem_report. py", line 18, in
<module>
* * from email.MIMEMulti part import MIMEMultipart
* File "/usr/lib/python2.5/email/__init__.py", line 79, in __getattr__
* * __import__(self .__name__)
ImportError: No module named multipart

I've gotten this error from py2exe before. I'm not sure how freeze
works, but in py2exe I had to make sure the email package wasn't being
accidentally excluded and explicitly included.

>
Original exception was:
Traceback (most recent call last):
* File "/home/grossetti/Documents/Code/Python/src/jester/service.py",
line 16, in <module>
* * from jester import constants, utils
* File "/home/grossetti/Documents/Code/Python/src/jester/utils.py", line
20, in <module>
* * from twisted.interne t.protocol import Protocol, ClientCreator
* File "/usr/lib/python2.5/site-packages/twisted/internet/protocol.py",
line 17, in <module>
* * from zope.interface import implements
* File "/usr/lib/python2.5/site-packages/zope/__init__.py", line 20, in
<module>
* * pkg_resources.d eclare_namespac e('zope')
* File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1749,
in declare_namespa ce
* * _handle_ns(pack ageName, path_item)
* File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1719,
in _handle_ns
* * path = module.__path__ ; path.append(sub path)
AttributeError: 'str' object has no attribute 'append'

Does anyone have any ideas as of why I get this?

Thank you,
Gabriel
I don't know what this second error is...

Mike
Sep 23 '08 #2
Mike Driscoll wrote:
On Sep 23, 5:01 am, Gabriel Rossetti <gabriel.rosse. ..@arimaz.com>
wrote:
>Hello everyone,

I'm trying to use python's freeze utility but I'm running into problems.
I called it like this :

python /usr/share/doc/python2.5/examples/Tools/freeze/freeze.py
~/Documents/Code/Python/src/jester/service.py -m jester

then I did : make

then I tried to run it : ./service

and I get this :

grossetti@desk top-01:~/tmp/freeze$ ./service
Traceback (most recent call last):
File "/home/grossetti/Documents/Code/Python/src/jester/service.py",
line 16, in <module>
from jester import constants, utils
File "/home/grossetti/Documents/Code/Python/src/jester/utils.py", line
20, in <module>
from twisted.interne t.protocol import Protocol, ClientCreator
File "/usr/lib/python2.5/site-packages/twisted/internet/protocol.py",
line 17, in <module>
from zope.interface import implements
File "/usr/lib/python2.5/site-packages/zope/__init__.py", line 20, in
<module>
pkg_resources.d eclare_namespac e('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1749,
in declare_namespa ce
_handle_ns(pack ageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1719,
in _handle_ns
path = module.__path__ ; path.append(sub path)
AttributeError : 'str' object has no attribute 'append'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/apport_python_h ook.py", line
38, in apport_exceptho ok
from apport.packagin g_impl import impl as packaging
File "/usr/lib/python2.5/site-packages/apport/__init__.py", line 1, in
<module>
from apport.report import Report
File "/usr/lib/python2.5/site-packages/apport/report.py", line 20, in
<module>
from problem_report import ProblemReport
File "/usr/lib/python2.5/site-packages/problem_report. py", line 18, in
<module>
from email.MIMEMulti part import MIMEMultipart
File "/usr/lib/python2.5/email/__init__.py", line 79, in __getattr__
__import__(self .__name__)
ImportError: No module named multipart


I've gotten this error from py2exe before. I'm not sure how freeze
works, but in py2exe I had to make sure the email package wasn't being
accidentally excluded and explicitly included.
I tried that (-m email), didn't work, I added -E and I get this :

There are some missing modules: ['Carbon.File', 'Carbon.Folder' ,
'Carbon.Folders ', 'EasyDialogs', 'FCNTL', 'MacOS', 'SOCKS',
'_dummy_threadi ng', '_emx_link', '_md5', '_sha', '_sha256', '_sha512',
'_subprocess', '_winreg', '_xmlplus', 'ce', 'email.Encoders ',
'email.Generato r', 'email.Iterator s', 'email.MIMEBase ',
'email.MIMEMult ipart', 'email.MIMEText ', 'email.Utils', 'gestalt', 'ic',
'java.lang', 'mac', 'msvcrt', 'nt', 'org.python.cor e', 'os.path', 'os2',
'pywintypes', 'riscos', 'riscosenviron' , 'riscospath', 'rourl2path',
'sgi', 'win32api', 'win32con', 'win32event', 'win32file', 'win32pipe',
'win32process', 'win32security']

so I tried to see if it existed :
>>import email
email.MIMEMul tipart
<email.LazyImpo rter object at 0xb7d6a62c>
>>>
maybe this is the problem, an email.MIMEMulti part object isn't what is
returned but instead an email.LazyImpor ter object is, so freeze isn't
happy... any ideas on how to solve this?
>Original exception was:
Traceback (most recent call last):
File "/home/grossetti/Documents/Code/Python/src/jester/service.py",
line 16, in <module>
from jester import constants, utils
File "/home/grossetti/Documents/Code/Python/src/jester/utils.py", line
20, in <module>
from twisted.interne t.protocol import Protocol, ClientCreator
File "/usr/lib/python2.5/site-packages/twisted/internet/protocol.py",
line 17, in <module>
from zope.interface import implements
File "/usr/lib/python2.5/site-packages/zope/__init__.py", line 20, in
<module>
pkg_resources.d eclare_namespac e('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1749,
in declare_namespa ce
_handle_ns(pack ageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.p y", line 1719,
in _handle_ns
path = module.__path__ ; path.append(sub path)
AttributeError : 'str' object has no attribute 'append'

Does anyone have any ideas as of why I get this?

Thank you,
Gabriel

I don't know what this second error is...

Mike
--
http://mail.python.org/mailman/listinfo/python-list
Sep 24 '08 #3

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

Similar topics

145
6306
by: David MacQuigg | last post by:
Playing with Prothon today, I am fascinated by the idea of eliminating classes in Python. I'm trying to figure out what fundamental benefit there is to having classes. Is all this complexity unecessary? Here is an example of a Python class with all three types of methods (instance, static, and class methods). # Example from Ch.23, p.381-2 of Learning Python, 2nd ed. class Multi:
11
2766
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each other. On my application startup, I configure the objects usting the RemotingConfiguration class to load the config file. Then I "ping" each of the objects to call their constructors. This all works fine if no one is attempting to connect at the...
6
2104
by: diffuser78 | last post by:
Hi, I have known python for about 3-4 months now. My knowledge is still very limited. I wrote a small app using wxPython. Now, I want to create an installer for it (on Linux platform.) for the people I developed this small utility. These people use some customized variant of Red Hat Linux. I found on
3
5168
by: unexpected | last post by:
Hi all, I'm currently working on a large, legacy Fortran application. I would like to start new development in Python (as it is mainly I/O related). In order to do so, however, the whole project needs to be able to compile in Fortran. I'm aware of resources like the F2Py Interface generator, but this only lets me access the Fortran modules I need in Python. I'm wondering if there's a way to generate the .o files from Python (maybe...
0
1240
by: Mitko Haralanov | last post by:
OK, this might be a stupid question: for the life of me, I can't find Python's freeze.py utility in the Python distribution that comes with FC6. Has it been removed from the distribution? Has it been removed from Python? I have FC6's python-2.4.4 rpms installed (python, python-devel, python-tools, etc) and the script is neither in /usr/lib/python-2.4/Tools or /usr/lib/python-2.4/Demos
8
1130
by: Barry Warsaw | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On behalf of the Python development team and the Python community, I am happy to announce the third alpha release of Python 2.6, and the fifth alpha release of Python 3.0. Please note that these are alpha releases, and as such are not suitable for production environments. We continue to strive for a high degree of quality, but there are still some known problems and
0
8781
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
9285
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9155
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
9050
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
8993
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
5938
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();...
0
4448
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...
2
2500
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2094
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.