View Single Post
Old 11-25-2020, 08:32 AM   #1
xxyzz
Evangelist
xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.
 
Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
Can't import Crypto.Cipher

I'm testing calibre 5.5 on linux and mac and get the following error:

Code:
$ calibre-debug
Welcome to the interactive calibre shell!
Use exit to quit
>>> from Crypto.Cipher import AES
Traceback (most recent call last):
  File "calibre/utils/ipython.py", line 191, in ipython
ModuleNotFoundError: No module named 'IPython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "bypy-importer.py", line 154, in exec_module
  File "Crypto/Cipher/__init__.py", line 27, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "bypy-importer.py", line 154, in exec_module
  File "Crypto/Cipher/_mode_ecb.py", line 35, in <module>
  File "Crypto/Util/_raw_api.py", line 308, in load_pycryptodome_raw_lib
OSError: Cannot load native module 'Crypto.Cipher._raw_ecb': Trying '_raw_ecb.cpython-38-darwin.so': dlopen(/Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.cpython-38-darwin.so, 6): no suitable image found.  Did find:
        /Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.cpython-38-darwin.so: stat() failed with errno=20, Trying '_raw_ecb.abi3.so': dlopen(/Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.abi3.so, 6): no suitable image found.  Did find:
        /Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.abi3.so: stat() failed with errno=20, Trying '_raw_ecb.so': dlopen(/Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.so, 6): no suitable image found.  Did find:
        /Applications/calibre.app/Contents/Frameworks/plugins/python-lib.bypy.frozen/Crypto/Util/../Cipher/_raw_ecb.so: stat() failed with errno=20
I find pycryptodome in the /bypy/sources.json file so I guess calibre should have this library but don't know why I can't use it.
xxyzz is offline   Reply With Quote