![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2021
Location: Israel
Device: Kindle PaperWhite 3 (2015) WiFi
|
porting plugin to python3 help
Hello. I was looking into porting the Xray-creator plugin to python3. So far I have only tried to edit an import in it's ui.py file, that imports the now renamed httplib. I downloaded the plugin, unzipped it and changed that single line of code. Despite the minor change, when I try to load the plugin from file it now says:
calibre.customize.InvalidPlugin: The plugin in '/home/username/Downloads/xray_creator_calibre_plugin_3_2_1.zip' is invalid. It does not contain a top-level __init__.py file even though the plugin clearly contains one, and when I try to load the original plugin it does not give such error. What could I possibly be missing? |
![]() |
![]() |
![]() |
#2 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,714
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Moderator Notice
Did you try looking through this thread ==>> Attn plugin devs: porting to python 3 And I'll move this to the Development subforum BR |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
The usual reason for that is zipping up the plugin incorrectly. You probably have zipped up the files so that the plugin files are in a directory inside the zip file, rather than them being in the top level.
Alternatively, it is exactly as the error said and you are missing the "__init__.py" file. For either of these, if you look at the structure of the current version of the file, you should be able to see what is wrong. Otherwise, post your copy in the thread and we can look at it. |
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2021
Location: Israel
Device: Kindle PaperWhite 3 (2015) WiFi
|
Quote:
![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
Tags |
de\\ |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Attn plugin devs: porting to python 3 | kovidgoyal | Plugins | 129 | 06-16-2020 01:31 AM |
Developing plugins (python3) | rigogsilva | Development | 7 | 05-20-2020 10:04 PM |
python3 plugins? | Claghorn | Plugins | 4 | 11-12-2019 07:57 PM |
Aura How to install python3 in Kobo Aura? | guchai25 | Kobo Reader | 0 | 11-12-2019 09:41 AM |
Python3 on Aura One | Kristoffer_1 | Kobo Developer's Corner | 5 | 07-06-2019 06:20 PM |