By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,996 Members | 1,498 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,996 IT Pros & Developers. It's quick & easy.

Need help in Py2exe

P: n/a
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?

Oct 20 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Kirt wrote:
-------------------------------------------------------------------------------
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/Work...agesAndModules

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>

Oct 20 '06 #2

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

http://www.py2exe.org/index.cgi/Work...agesAndModules

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>
Thanx for the help. It worked.

Oct 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.