473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

SAXReaderNotAvailble: No parsers found

Vincent Yau <y...@ohsu.eduwrites:
I am trying to use Python SAX API to parse XML files. I do see expat.py
somewhere underneath my Python 2.1.1 installation (on Solaris).
But I got this error when invoking the xml.sax.make_parser() call. Any
tip/help much appreciated.

You should install Expat before building Python. Best, you edit
Modules/Setup to build pyexpat explicitly.

Regards,
Martin
Fast-forward to 2008

I installed Python 3.0b2 on a Windows Vista laptop (after having
previously installed Python 2.5), and I am getting this same error:

Traceback (most recent call last):
File "Programming\Python\monkeys.py", line 24, in <module>
test_parse(sys.argv[1])
File "Programming\Python\monkeys.py", line 21, in test_parse
xml.sax.parse(f, handler)
File "C:\Python30\lib\xml\sax\__init__.py", line 30, in parse
parser = make_parser()
File "C:\Python30\lib\xml\sax\__init__.py", line 90, in make_parser
raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found

I see a pyexpat.lib in the C:\Python30\libs folder.
I also see a pyexpat.pyd in the C:\Python30\DLLs folder.

It works in Python 2.5. I installed Python 3.0b2 as admin.
Does anyone know what is wrong and how to fix it?

Aug 31 '08 #1
1 4182
On Aug 30, 8:59*pm, josh logan <dear.jay.lo...@gmail.comwrote:
Vincent Yau <y...@ohsu.eduwrites:
I am trying to use Python SAX API to parse XML files. *I do see expat.py
somewhere underneath my Python 2.1.1 installation (on Solaris).
But I got this error when invoking the xml.sax.make_parser() call. *Any
tip/help much appreciated.
You should install Expat before building Python. Best, you edit
Modules/Setup to build pyexpat explicitly.
Regards,
Martin

Fast-forward to 2008

I installed Python 3.0b2 on a Windows Vista laptop (after having
previously installed Python 2.5), and I am getting this same error:

Traceback (most recent call last):
* File "Programming\Python\monkeys.py", line 24, in <module>
* * test_parse(sys.argv[1])
* File "Programming\Python\monkeys.py", line 21, in test_parse
* * xml.sax.parse(f, handler)
* File "C:\Python30\lib\xml\sax\__init__.py", line 30, in parse
* * parser = make_parser()
* File "C:\Python30\lib\xml\sax\__init__.py", line 90, in make_parser
* * raise SAXReaderNotAvailable("No parsers found", None)
xml.sax._exceptions.SAXReaderNotAvailable: No parsers found

I see a pyexpat.lib in the C:\Python30\libs folder.
I also see a pyexpat.pyd in the C:\Python30\DLLs folder.

It works in Python 2.5. I installed Python 3.0b2 as admin.
Does anyone know what is wrong and how to fix it?
Does anyone have an answer for this?

I uninstalled both Python 2.5 and Python 3.0b2 and then re-installed
3.0b2, thinking that the installer was confusing 2.5 and 3.0b2 on
Windows Vista. Still have the same issue.
I had to use my XP machine, since the Vista installation seems broken
for Python 3.0b2. How do I fix this? How do I get Python to notice the
pyexpat.lib in the C:\Python30\DLLs folder in Vista?

Thanks
Sep 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Will Stuyvesant | last post by:
There seems to be no XML parser that can do validation in the Python Standard Libraries. And I am stuck with Python 2.1.1. until my web master upgrades (I use Python for CGI). I know pyXML has...
0
by: Magnus Lie Hetland | last post by:
I'm working on a project where I have to create parsers on the fly, based on input to my program. I think Spark seems like a good candidate for the parser generation part, but it seems very geared...
1
by: Charles Fineman | last post by:
I realize there are issues with the cached schema getting stale but I would like to know if any (many? most?) of the XML parsers out there cache a representation of the schema (or DTD) rather than...
1
by: bloon | last post by:
I know there are three most popular open-source XML parsers. They are expat, libxml, and Xerces. All three are cross-platform. Does anybody test these three parsers? Which one is the fastest when...
2
by: Dale Strickland-Clark | last post by:
A few days ago there was a discussion about which XML parser to use with Python. However, the discussion didn't cover validating parsers, at least, not w3.org XML Schemas. I looked into all the...
2
by: Nainesh Jhaveri | last post by:
I have a ton of Business logic writter in Java, which I am trying to expose to .NET platform using Visual J#. NET. The java code is making extensive use of java.rmi.* package. but, the latest...
2
by: dwelch91 | last post by:
Hi, c.l.p.'ers- I am having a problem with the import of xml.parsers.expat that has gotten me completely stumped. I have two programs, one a PyQt program and one a command line (text) program...
0
by: JosAH | last post by:
Greetings, welcome back at the sequel of the parsers article chapter. This part is dedicated to the ExpressionParser, the largest parser class for our little language. This class parses a...
0
by: JosAH | last post by:
Greetings, this week's article part discusses the parsers used for our little language. We will implement the parsers according to the grammar rules we defined in the second part of this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.