pavelzw / calibre-kindle-comics

A calibre plugin that converts your comics into a readable format for kindle.
ISC License
47 stars 4 forks source link

NotADirectoryError while converting a cbz to mobi #4

Open hex007 opened 3 years ago

hex007 commented 3 years ago

Calibre version 5.17

NotADirectoryError: [Errno 20] Not a directory: '~/.config/calibre/plugins/Kindle Comics Input.zip/kindle_comic_lib/text_unidecode/../..'

Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "site.py", line 45, in <module>
  File "site.py", line 41, in main
  File "calibre/utils/ipc/worker.py", line 216, in main
  File "calibre/gui2/convert/gui_conversion.py", line 41, in gui_convert_override
  File "calibre/gui2/convert/gui_conversion.py", line 28, in gui_convert
  File "calibre/ebooks/conversion/plumber.py", line 1105, in run
  File "calibre/customize/conversion.py", line 245, in __call__
  File "calibre_plugins.kindle_comics.__init__", line 41, in convert
  File "calibre_plugins.kindle_comics.make_book", line 28, in make_book
  File "calibre_plugins.kindle_comics.make_book", line 50, in sanitize_tree
  File "calibre_plugins.kindle_comics.make_book", line 73, in _slugify
  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 "calibre/customize/zipplugin.py", line 192, in exec_module
  File "calibre_plugins.kindle_comics.kindle_comic_lib.__init__", line 3, 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 "calibre/customize/zipplugin.py", line 192, in exec_module
  File "calibre_plugins.kindle_comics.kindle_comic_lib.slugify", line 19, 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 "calibre/customize/zipplugin.py", line 192, in exec_module
  File "calibre_plugins.kindle_comics.kindle_comic_lib.text_unidecode.__init__", line 15, in <module>
  File "zipfile.py", line 1251, in __init__
NotADirectoryError: [Errno 20] Not a directory: '~/.config/calibre/plugins/Kindle Comics Input.zip/kindle_comic_lib/text_unidecode/../..'
Bouilloire-dot commented 3 years ago

Same for me! (I’m running calibre on Ubuntu)

pavelzw commented 3 years ago

Hey guys, sorry for the late reply. I'll try to reproduce and fix the error in a few weeks when I have a bit more time.

hex007 commented 3 years ago

I have the solution. The '../..' is not resolving properly on *nix systems. Wrapping it with "os.path.abspath(pathwith..)" works

I will submit a PR for it

pavelzw commented 3 years ago

Alright, thanks!

acbakhit commented 6 months ago

@hex007 I'm still experiencing this issue, was a solution ever pushed? Any advice on how I can resolve this?

nadavsavio commented 1 month ago

I'm also getting this error way up here in 2024.

combbbb commented 3 weeks ago

same here, any solutions or is this project not maintained anymore? thanks!