3

I want to run ebook-convert together with Gitbook to produce my own pdf-files from my static files. When I just type ebook-convert I get this silly error message…

I installed

  • a fresh version of python
  • installed convert-ebook with NPM
  • and Gitbook is running perfectly

Does anyone know what I could do?

Python function terminated unexpectedly: dlopen(/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
Traceback (most recent call last):
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 209, in main
    return run_entry_point()
  File "/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/site.py", line 113, in run_entry_point
    pmod = __import__(mod, fromlist=[1], level=0)
  File "site-packages/calibre/__init__.py", line 22, in <module>
  File "site-packages/calibre/startup.py", line 51, in <module>
  File "site-packages/calibre/ptempfile.py", line 8, in <module>
  File "lib/python2.7/tempfile.py", line 32, in <module>
  File "lib/python2.7/io.py", line 51, in <module>
ImportError: dlopen(/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so, 2): Symbol not found: __PyCodecInfo_GetIncrementalDecoder
  Referenced from: /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
  Expected in: flat namespace
 in /Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so
Phlow
  • 688
  • 4
  • 14

2 Answers2

3

I ran into the same problem and fixed it by updating Python from version 2.7.10 to 2.7.11.

AdrianCooney
  • 727
  • 5
  • 13
  • Thank you for letting me know. Unfortunately it didn't help me. Nevertheless, now I use an updated version of Python ;) – Phlow Apr 04 '16 at 07:18
0

I use my system python lib-dynload/_io.so replace with the

/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so

then it works, hope it can help you.

tks

jiahut
  • 1,451
  • 15
  • 14
  • Hey @jiahut I will check it out in the next week. Thankyou for your help. – Phlow Aug 19 '16 at 08:31
  • Hey @jiahut – I found ´/Applications/calibre.app/Contents/Resources/Python/lib/python2.7/lib-dynload/_io.so´ but where do I find `lib-dynload/_io.so` – Phlow Aug 30 '16 at 08:26