473,799 Members | 3,006 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SAXReaderNotAva ilble: No parsers found

Vincent Yau <y...@ohsu.eduw rites:
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_pa rser() 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\Py thon\monkeys.py ", line 24, in <module>
test_parse(sys. argv[1])
File "Programming\Py thon\monkeys.py ", line 21, in test_parse
xml.sax.parse(f , handler)
File "C:\Python30\li b\xml\sax\__ini t__.py", line 30, in parse
parser = make_parser()
File "C:\Python30\li b\xml\sax\__ini t__.py", line 90, in make_parser
raise SAXReaderNotAva ilable("No parsers found", None)
xml.sax._except ions.SAXReaderN otAvailable: No parsers found

I see a pyexpat.lib in the C:\Python30\lib s folder.
I also see a pyexpat.pyd in the C:\Python30\DLL s 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 4222
On Aug 30, 8:59*pm, josh logan <dear.jay.lo... @gmail.comwrote :
Vincent Yau <y...@ohsu.eduw rites:
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_pa rser() 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\Py thon\monkeys.py ", line 24, in <module>
* * test_parse(sys. argv[1])
* File "Programming\Py thon\monkeys.py ", line 21, in test_parse
* * xml.sax.parse(f , handler)
* File "C:\Python30\li b\xml\sax\__ini t__.py", line 30, in parse
* * parser = make_parser()
* File "C:\Python30\li b\xml\sax\__ini t__.py", line 90, in make_parser
* * raise SAXReaderNotAva ilable("No parsers found", None)
xml.sax._except ions.SAXReaderN otAvailable: No parsers found

I see a pyexpat.lib in the C:\Python30\lib s folder.
I also see a pyexpat.pyd in the C:\Python30\DLL s 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\DLL s 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
6064
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 validating parsers, but I can not compile things on the (unix) webserver. And even if I could, the compiler I have access to would be different than what was used to compile python for CGI. I need to write a CGI script that does XML validation...
0
1887
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 toward hard-coded parsers. I could, I suppose, set the docstrings of the objects to contain the generated grammars, but that seems sort of like a misuse. Does anyone have any experience with "manually" constructing parsers with Spark, i.e....
1
1492
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 retrieving and parsing it every time.
1
1559
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 loading and parsing large XML files? Thanks.
2
1488
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 parsers that came up in the discussion but found no mention of w3.org schemas. It seems there are a few DTD validating parsers but that's all.
2
1394
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 version of Visual J#. NET is not supporting the same. Is there a way to make this happen. Does any one have any information on migrating java RMI code into .NET platform.
2
3744
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 that both eventually call the same code that imports xml.parsers.expat. Both give me different results... The code that gets called is (print statements have been added for debugging):
0
3194
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 complete expression and just like the other parser classes calls the Generator on the fly. When the parse has completed successfully, the generated code is returned. Otherwise the parse is aborted and an exception is thrown telling the reason of the...
0
3382
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 article. As you will see shortly, the implementation of the parsers is an almost one-to-one translation of those grammar rules. Recursive descent parsing The grammar rules are highly recursive, i.e. one rule mentions another rule
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10260
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10243
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.