Need help in Py2exe

K

Kirt

I have a simple scrips that Parses a XML file and prints its element.

1)Main.py
2)Handler.py
3)test.xml

The scripts works fine from comand prompt.

Now i wanted to convert it to an exe. So i wrote a setup.py scripts as
folows:

#-------------------------Setup.py----------------------------------
from distutils.core import setup
import py2exe

setup(
name = "Main",
description = " Parse XML",
version = "0.1",
windows = [
{"script": "main.py",
"icon_resources": [(1, "xml.ico")]
}
],

data_files=[("List.xml"),("handler.py")],
)
-------------------------------------------------------------------------------
When i run this as python setup.py py2exe. I get an main.exe file in
dist folder. But when i run the file i get an error --
Traceback (most recent call last):
File "main.py", line 7, in ?
File "xml\sax\sax2exts.pyc", line 37, in make_parser
File "xml\sax\saxexts.pyc", line 77, in make_parser
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found..

I think i am missing something in setup.py file. Can anyone help?
 
F

Fredrik Lundh

Kirt said:
-------------------------------------------------------------------------------
When i run this as python setup.py py2exe. I get an main.exe file in
dist folder. But when i run the file i get an error --
Traceback (most recent call last):
File "main.py", line 7, in ?
File "xml\sax\sax2exts.pyc", line 37, in make_parser
File "xml\sax\saxexts.pyc", line 77, in make_parser
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found..

I think i am missing something in setup.py file. Can anyone help?

there's a page on the py2exe site about tweaks necessary for specific
modules:

http://www.py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules

look for:

If you're getting File "xml\sax\saxexts.pyc", line 77, in
make_parser; xml.sax._exceptions.SAXReaderNotAvailable: No
parsers found, read this

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top