joseluiscd / calibre-kepubify

Calibre plugin to convert automatically convert EPUBs to Kobo EPUBs on import using kepubify
MIT License
14 stars 3 forks source link

installation fails #2

Open Villard opened 2 years ago

Villard commented 2 years ago

Hello I try to install the plugin, but Calibre can't install it. saying "It does not contain a top-level init.py file" The details of the error are below. I'd before downloaded kepubify-windows-64bit.exe and put in the directory "C:\Program Files\Calibre2" which is my calibre directory and set as a PATH. thank you to give me the solution Villard

details of the error :

calibre, version 6.7.1 ERREUR : Exception non gérée: InvalidPlugin:The plugin in 'C:\Users\localadmin\Downloads\calibre-kepubify-master.zip' is invalid. It does not contain a top-level init.py file

calibre 6.7.1 embedded-python: True Windows-10-10.0.19044-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19044') Python 3.10.1 Windows: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free') Interface language: fr Successfully initialized third party plugins: DeDRM (10, 0, 3) && EpubMerge (2, 15, 0) && EpubSplit (3, 5, 0) && Find Duplicates (1, 10, 7) && KePub Input (3, 6, 3) && KePub Metadata Reader (3, 4, 3) && KePub Metadata Writer (3, 4, 3) && KePub Output (3, 6, 3) && Kobo Books (1, 9, 2) && Kobo Utilities (2, 16, 6) && KoboTouchExtended (3, 6, 3) && Obok DeDRM (10, 0, 3) && Quality Check (1, 13, 0) Traceback (most recent call last): File "calibre\gui2\preferences\plugins.py", line 325, in add_plugin File "calibre\customize\ui.py", line 479, in add_plugin File "calibre\customize\ui.py", line 64, in load_plugin File "calibre\customize\zipplugin.py", line 298, in load File "calibre\custo_mize\zipplugin.py", line 393, in _locatecode calibre.customize.InvalidPlugin: The plugin in 'C:\Users\localadmin\Downloads\calibre-kepubify-master.zip' is invalid. It does not contain a top-level init.py file **

joseluiscd commented 2 years ago

Hi,

The problem is with the archive generated by GitHub, as it puts the contents of the repository inside a calibre-kepubify-master directory in the zip file. You can download the CalibreKepubify.zip in Releases. Alternatively, re-zip the contents inside the calibre-kepubify-master folder of your already downloaded zip.

I did not test the plug-in on windows, so let me know if you find any other error. J.L.

Clearmist commented 1 year ago

Hello Jose, here is another Windows issue.

calibre, version 6.17.0 ERROR: Unhandled exception: InvalidPlugin:The plugin at C:\Users{username}\calibre-kepubify.zip cannot be used on windows

calibre 6.17 embedded-python: True Windows-10-10.0.22621-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.22621') Python 3.10.1 Windows: ('10', '10.0.22621', 'SP0', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: Kobo Utilities (2, 16, 7) Traceback (most recent call last): File "calibre\gui2\preferences\plugins.py", line 325, in add_plugin File "calibre\customize\ui.py", line 513, in add_plugin File "calibre\customize\ui.py", line 64, in load_plugin File "calibre\customize\zipplugin.py", line 328, in load calibre.customize.InvalidPlugin: The plugin at C:\Users{username}\calibre-kepubify.zip cannot be used on windows

cgillinger commented 1 month ago

I have the same issue as @Clearmist above, it gives me a "This plugin cannot be used on Windows". Running Win11.

joseluiscd commented 3 weeks ago

Hi,

I cannot add Windows as a supported platform, as I am not able to test it. If anyone is willing to check whether it works or not, try adding it to the supported_platforms list in the __init__.py file. I would gladly append it to the OS list when someone confirms it works (it may be required to add the .exe extension to the command or whatever).

gingerbeardman commented 1 week ago

I got it to run on osx.

  1. install kepubify brew install kepubify
  2. add 'osx' to the list of supported platforms
    supported_platforms = ['linux','osx']
  3. there is no step 3