XML parser and py2exe

Anand Pillai pythonguy at Hotpop.com
Sun Jul 20 17:21:39 CEST 2003


I am using the expat parser in the 'xml.parsers.expat' module in
my code. The code works well as source, but the py2exe executable created
using it does not. I get the following traceback.

Traceback (most recent call last):
  File "<string>", line 146, in ?
  File "imputil.pyo", line 103, in _import_hook
  File "<string>", line 52, in _import_top_module
  File "imputil.pyo", line 216, in import_top
  File "imputil.pyo", line 271, in _import_one
  File "<string>", line 128, in _process_result
  File "HarvestManConfig.pyo", line 110, in ?
  File "imputil.pyo", line 103, in _import_hook
  File "<string>", line 52, in _import_top_module
  File "imputil.pyo", line 216, in import_top
  File "imputil.pyo", line 271, in _import_one
  File "<string>", line 128, in _process_result
  File "HarvestManXMLParser.pyo", line 12, in ?
  File "imputil.pyo", line 132, in _import_hook
  File "<string>", line 70, in _finish_import
  File "imputil.pyo", line 318, in _load_tail
ImportError: No module named _xmlplus.parsers

I am creating my py2exe executable like this.

$python setup.py py2exe --packages=encodings -O2

Where the setup.py is the standard py2exe script for
creating executables. (copied below).

# setup.py
# install script for py2exe
from distutils.core import setup
import py2exe

setup(name="HarvestMan",
     scripts=["HarvestMan.py"],
)

Thanks,

~Anand




More information about the Python-list mailing list