472,358 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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@desktop-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.internet.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.declare_namespace('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1749,
in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1719,
in _handle_ns
path = module.__path__; path.append(subpath)
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_hook.py", line
38, in apport_excepthook
from apport.packaging_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.MIMEMultipart 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.internet.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.declare_namespace('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1749,
in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1719,
in _handle_ns
path = module.__path__; path.append(subpath)
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 2504
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@desktop-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.internet.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.declare_namespace('zope')
* File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1749,
in declare_namespace
* * _handle_ns(packageName, path_item)
* File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1719,
in _handle_ns
* * path = module.__path__; path.append(subpath)
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_hook.py", line
38, in apport_excepthook
* * from apport.packaging_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.MIMEMultipart 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.internet.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.declare_namespace('zope')
* File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1749,
in declare_namespace
* * _handle_ns(packageName, path_item)
* File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1719,
in _handle_ns
* * path = module.__path__; path.append(subpath)
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@desktop-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.internet.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.declare_namespace('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1749,
in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1719,
in _handle_ns
path = module.__path__; path.append(subpath)
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_hook.py", line
38, in apport_excepthook
from apport.packaging_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.MIMEMultipart 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_threading', '_emx_link', '_md5', '_sha', '_sha256', '_sha512',
'_subprocess', '_winreg', '_xmlplus', 'ce', 'email.Encoders',
'email.Generator', 'email.Iterators', 'email.MIMEBase',
'email.MIMEMultipart', 'email.MIMEText', 'email.Utils', 'gestalt', 'ic',
'java.lang', 'mac', 'msvcrt', 'nt', 'org.python.core', '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.MIMEMultipart
<email.LazyImporter object at 0xb7d6a62c>
>>>
maybe this is the problem, an email.MIMEMultipart object isn't what is
returned but instead an email.LazyImporter 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.internet.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.declare_namespace('zope')
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1749,
in declare_namespace
_handle_ns(packageName, path_item)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1719,
in _handle_ns
path = module.__path__; path.append(subpath)
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
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...
11
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...
6
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...
3
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...
0
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...
8
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

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.