473,379 Members | 1,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 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 2621
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.