SAXReaderNotAvailble: No parsers found

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • josh logan

    #1

    SAXReaderNotAvailble: 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?

  • josh logan

    #2
    Re: SAXReaderNotAva ilble: No parsers found

    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

    Comment

    Working...