![]() |
#1 |
Plugin developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
|
Installation problem with expat, ruins SAX support
Hi,
Today after Calibre's update I've noticed, that my DOCX Input plugin does not work anymore. Error is: Traceback (most recent call last): File "site.py", line 58, in main File "site-packages/calibre/utils/ipc/worker.py", line 191, in main File "site-packages/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override File "site-packages/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert File "site-packages/calibre/ebooks/conversion/plumber.py", line 979, in run File "site-packages/calibre/customize/conversion.py", line 208, in __call__ File "calibre_plugins.docx_input_plugin.docx_input" , line 29, in convert File "calibre_plugins.docx_input_plugin.docx_input" , line 58, in _parseStyles File "xml/sax/__init__.py", line 93, in make_parser SAXReaderNotAvailable: No parsers found I have reinstalled the Calibre and there is expat failure during the installation too: ............. Symlinking /opt/calibre/epub-fix to /usr/bin/epub-fix Symlinking /opt/calibre/ebook-device to /usr/bin/ebook-device Symlinking /opt/calibre/calibredb to /usr/bin/calibredb Setting up bash completion... Traceback (most recent call last): File "site-packages/calibre/utils/config.py", line 264, in refresh File "site-packages/calibre/utils/config.py", line 253, in raw_to_object File "plistlib.py", line 103, in readPlistFromString File "plistlib.py", line 78, in readPlist File "plistlib.py", line 401, in parse File "xml/parsers/expat.py", line 4, in <module> ImportError: /opt/calibre/lib/python2.7/lib-dynload/pyexpat.so: undefined symbol: XML_SetHashSalt Installing bash completion to /etc/bash_completion.d/calibre Is there any quick workaround with this problem? And I wonder if it would affect other OSes? I am on Ubuntu 11.10. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,210
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Are you on a 32-bit or a 64-bit OS? Generally speaking dont use expat, lxml is much better.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,210
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The fix is to update the version of libexpat on your system to one that defines XML_SetHashSalt (this is a good idea since this function is needed for a security fix in python), I'll upload a new linux build of calibre with a bundled libexpat in a couple of hours.
|
![]() |
![]() |
![]() |
#4 |
Plugin developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
|
64 bit. I had a quick scan-through lxml, but it would require quite a lot of rework. And it supports only startElementNS, not startElement, which is also not that convenient...
|
![]() |
![]() |
![]() |
#5 |
Plugin developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 108
Karma: 24394
Join Date: Feb 2012
Location: Lithuania
Device: Kindle
|
Thank you for new version. I will give lxml a try anyway, if you suggest it is better.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,210
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The way to use lxml is not to write a parser, but to use the builtin parsers, and then use XPath on the parsed document. This is what calibre uses in its conversion pipeline.
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,210
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Builds with bundled libexpat are now live.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Action Rohmer, Sax: Sax Rohmer Anthology, Vol 1. v6. 29 Dec 2009 | HarryT | ePub Books (offline) | 4 | 06-16-2011 03:05 PM |
Mystery and Crime Rohmer, Sax: Sax Rohmer Anthology, Vol 1. v6. 29 Dec 2009 | HarryT | BBeB/LRF Books (offline) | 5 | 12-29-2009 12:30 PM |
Action Rohmer, Sax: Sax Rohmer Anthology, Vol 2. v5. 29 Dec 2009 | HarryT | ePub Books (offline) | 2 | 12-29-2009 11:41 AM |
Mystery and Crime Rohmer, Sax: Sax Rohmer Anthology, Vol 2. v5. 29 Dec 2009 | HarryT | Kindle Books (offline) | 10 | 12-29-2009 11:17 AM |
Mystery and Crime Rohmer, Sax: Sax Rohmer Anthology, Vol 3. v3, 24 Aug 2008 | HarryT | Kindle Books (offline) | 1 | 08-24-2008 09:34 AM |