[Pythonmac-SIG] bundlebuilder --standalone not working
Bob Swerdlow
rswerdlow at transpose.com
Wed Sep 3 13:13:50 EDT 2003
Unfortunately, building with --standalone does not seem to include the right
xml code.
If I build with "python buildapp.py build" my application works as I expect
it to, but it is not stand-alone.
If I build with "python buildapp.py --standalone build", I get
ImportError: No module named sax
on
form xml.sax import saxutils
If I build with "python buildapp.py --standalone --package=_xmlplus", I get:
./build/Goombah.app/Contents/Resources/Modules.zip/xmllib.py:10:
DeprecationWarning:
The xmllib module is obsolete. Use xml.sax instead.
and
LookupError: unknown encoding: string-escape
in pickle.py (the stack trace is attached below).
My guess is that _xmlplus is not the package that I need. Is there some
other package that is needed to include the sax module?
Thanks for your help!
Here's the end of the stack trace for the "string-escape" problem, which is
in the pickle code:
...
strVersion = pickle.load(prefFile) # version string for future changes
File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/pickle.py",
line 1390, in load
return Unpickler(file).load()
File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/pickle.py",
line 872, in load
dispatch[key](self)
File
"/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/pickle.py",
line 985, in load_string
self.append(rep.decode("string-escape"))
LookupError: unknown encoding: string-escape
----- Original Message -----
From: "Just van Rossum" <just at letterror.com>
To: "Bob Swerdlow" <rswerdlow at transpose.com>
Cc: <pythonmac-sig at python.org>; "Gary Robinson" <grobinson at transpose.com>
Sent: Tuesday, September 02, 2003 2:06 PM
Subject: Re: [Pythonmac-SIG] bundlebuilder --standalone not working
> Bob Swerdlow wrote:
>
> > However, when I run python buildapp.py --standalone build it
> > generates a bunch of warnings (I've appended them below) and when I
> > run the application, I get this error: from xml.sax import saxutils
> > ImportError: No module named sax
>
> This is most likely caused by PyXML's _xmlplus hack. Try to add
> --package=_xmlplus. If that doesn't work, you could tweak your install
> by removing the original xml package, and rename _xmlplus to xml.
>
> > When I look in the application package, the Frameworks directory
> > includes the Python.framework/Versions/2.3 directory, but it does NOT
> > have the lib subdirectory.
>
> Correct, only the bare necessities. Everything needed from the library
> is in Contents/Resources/Modules.zip and
> Contents/Resources/ExtensionModules/
>
> > I tried copying in that directory
> > manually, but the application still could not find it - presumably
> > because there is some kind of path that needs to be set for it.
>
> Contents/Resources/ is on sys.path, so if needed you can copy stuff
> there. But I'd rather find a way to let bundlebuilder do what you need.
>
> > So, how do I get --standalone to find the rest of these modules and
> > build a complete application?
>
> Let me know if the "--package=_xmlplus" thing worked.
>
> Just
>
>
More information about the Pythonmac-SIG
mailing list