7.26.2003

Grappling with Python XML parsing on OS X 10.2


Run-time errors encountered trying Google Hack #57: Python and the GoogleAPI

After struggling with various Python programming examples related to XML parsing, I discovered that the "Python No Parsers Found" run-time error is common on multiple platforms, and reported in numerous places on the Web. A thread describing the issue and suggesting a solution can be found at:
http://joi.ito.com/archives/2003/05/10/python_and_xml_and_the_agony_of_defeat.html

Jean-Yves Stervinou, the solution provider, also reported the issue at:
http://radio.weblogs.com/0001103/2003/02/05.html

But the most complete thread on the issue and the solution I finally used was found at:
http://paulbeard.no-ip.org/movabletype/archives/000493.html

Like myself, these individuals were using the default Python installation on Mac OSX 10.2 Jaguar, and all encountered run-time errors when attempting to parse XML in Python. The solution that worked for me was installing PyXML 0.8.1, as suggested on the last blog listed above. I was then able to successfully invoke Google Hack #57 from the UNIX command line on my server. Another hack that accessed an XML stock quote via a Python CGI also worked successfully.

I will update my own post at hacks.oreilly.com re: Google Hacks #57 (a Python-based example) to assist others encountering this problem:
http://hacks.oreilly.com/pub/h/177

Ahhh...the joys and challenges of hacking code. I must admit this whole experience confirmed the amazing value of the Web, Blogs and search engines in sharing and advancing knowledge None of the above material could be found at the Apple Computer Web site or online support knowledge base, at least around the date of this posting.

No comments: