py2exe problems
Thomas Heller
theller at python.net
Thu Aug 7 11:28:03 EDT 2003
"Alessandro Crugnola *sephiroth*" <alessandro at sephiroth.it> writes:
> i'm sorry, but it gives me the same warning also using python 2.2.3
The canonical test I use is to run the test_c14n.py test from the
PyXML source distribution through py2exe. It works for me, on Windows XP
Pro, SP 1, py2exe-0.4.1, Python 2.2.2, PyXML-0.8.3, with the command line
'python setup.py py2exe p encodings'
and this script:
from distutils.core import setup
import py2exe
setup(name='test_c14n', scripts=['test_c14n.py'], version='0')
If I don't include the '-p encodings' flag, the exe fails with this error:
C:\PyXML-0.8.3\test\dist\test_c14n>test_c14n
Traceback (most recent call last):
File "<string>", line 170, in ?
File "imputil.pyc", line 132, in _import_hook
File "<string>", line 70, in _finish_import
File "imputil.pyc", line 316, in _load_tail
File "imputil.pyc", line 271, in _import_one
File "<string>", line 128, in _process_result
File "xml\dom\ext\reader\__init__.pyc", line 20, in ?
LookupError: unknown encoding: utf-8
Can you try this and report back?
Thanks,
Thomas
PS: With Python 2.3 and py2exe-0.4.1, the traceback is this (even if -p
encodings had been given), note the different error message:
C:\PyXML-0.8.3\test\dist\test_c14n>test_c14n
Traceback (most recent call last):
File "<string>", line 170, in ?
File "imputil.pyc", line 132, in _import_hook
File "<string>", line 70, in _finish_import
File "imputil.pyc", line 316, in _load_tail
File "imputil.pyc", line 271, in _import_one
File "<string>", line 128, in _process_result
File "xml\dom\ext\reader\__init__.pyc", line 20, in ?
LookupError: no codec search functions registered: can't find encoding
More information about the Python-list
mailing list