How can I use xml.sax module on an executable made with PyInstaller?
Question: I want to have my application read a document using xml.sax.parse. Things work
fine but when I move the executable to a Windows server 2008 machine things
break down. I get an SAXReaderNotAvailable exception with "No parsers found"
message.

The setup I'm using to build the executable is:

  * 64 bit windows 7
  * Python 2.7.2 32-bit
  * PyInstaller 1.5.1


Answer: SAX readers seems to be dynamically imported, so the static analysis can't
detect them and they can't be embedded with application.

To correct this, you'll have to be explicit to force PyInstaller to import
those [hidden
modules](http://www.pyinstaller.org/export/latest/tags/1.5.1/doc/Manual.html?format=raw#listing-
hidden-imports).

Try to add this to you .spec (thanks Velociraptors) file :

    
    
    hiddenimports = ['xml.sax.drivers', 'xml.sax.drivers2']
    

