![]() |
#16 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I'm getting an error when trying to open a file dialog. It happens with both Add Book and Create Library. Both with beta and running from source. Pretty sure it's unrelated to plugins.
Debug log attached. (Sorry if there's a better place to report this sort of thing.) |
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,072
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
I have a plugin that uses the following import:
Code:
from Crypto.Cipher import AES Spoiler:
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Another issue I've found. (Win10, portable calibre 4.99 w/ py3 branch source.)
In Python3.7, zipfile.py wants the file-like objects it is handed to have attribute seekable. SpooledTemporaryFile doesn't always have that attribute. Calibre's db.format(..., as_file=True) hands out a SpooledTemporaryFile (child class). Which I can't read as a zip file, rather defeating the purpose of asking for an epub, for example. There is an Explanation about why SpooledTemporaryFile isn't seekable. So the question is, should Calibre return something else for db.format(..., as_file=True), or should plugins not call that when they want a usable zip file? Method db.cover(..., as_file=True) behaves the same. I haven't looked for other uses of SpooledTemporaryFile in Calibre. |
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,211
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
1) ACE ported almost flawlessly. It works fine but for one error in the config dialog: a) OPEN FOLDER. This gives the same error reported by @JimmXinu. Spoiler:
2) Skoob Sync had more problems. First I had a problem with encoding a password with base64 (which I ended up giving up). There were a lot of other errors about encode/decode of strings/bytes with urllib requests. Right now, it is working partially. Some functions work, others make calibre hang. Trying to debug now... ______________________________ EDIT: Looks like the problem is on my multi-threading code. Until now (4.6), sometimes I got an error like this: Code:
QObject::setParent: Cannot set parent, new parent is in a different thread ![]() This is my code for multi-threading: Spoiler:
Anyway... I will keep digging. Last edited by thiago.eec; 12-17-2019 at 06:41 PM. |
|
![]() |
![]() |
![]() |
#20 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
@JimmXinu, @thiago.eec
Can you try out my fork here? https://github.com/eli-schwartz/calibre/commits/py3 I think this commit should fix the file dialogs error: https://github.com/eli-schwartz/cali...381ecdb581d274 |
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
@jhowell,
Nothing in calibre depends on pycrypto, so I'm surprised you have it available in the prebuilt binaries at all. |
![]() |
![]() |
![]() |
#22 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#23 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
PR submitted as https://github.com/kovidgoyal/calibre/pull/1078
|
![]() |
![]() |
![]() |
#24 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Indeed, the majority of issues you're likely to have are related to encoding/decoding strings, and tools like modernize/futurize usually cannot help with that. You'll just need to resolve them via (usually) simple trial and error.
|
![]() |
![]() |
![]() |
#25 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
@jhowell: pycrypto is no longer maintained, so it has been replaced by pycryptodome, which is mostly a drop in replacement. https://github.com/Legrandin/pycryptodome
|
![]() |
![]() |
![]() |
#26 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
https://github.com/kovidgoyal/calibr...rces.json#L694 Why does calibre even bundle this -- I don't have it as a dependency for calibre, and it's always worked just fine. If I do extensive grepping of the sources, I see old versions of calibre bundled ezPyCrypto.py, but did not AFAICT actually use it. |
|
![]() |
![]() |
![]() |
#27 | ||
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Likely something in the windows freezing process, will tke a look at it whenI have a moment. Quote:
|
||
![]() |
![]() |
![]() |
#28 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,072
Karma: 91577715
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
_raw_ecb.cp38-win32.pyd Cyptographic functions are useful. I use them in some of my personal plugins and they are also used by a popular plugin that is not distributed via MobileRead. |
|
![]() |
![]() |
![]() |
#29 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ugh this is just python devs being lazy: https://bugs.python.org/issue26175
Guess I will have to do their work for them. |
![]() |
![]() |
![]() |
#30 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,351
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I uploaded 4.99.1 with fixes for all reported issues.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Plugin Devs: Should we include a License or COPYING file? | KevinH | Plugins | 3 | 08-15-2017 01:09 PM |
Attn plugin developers: calibre moving to Qt 5 | kovidgoyal | Plugins | 157 | 01-01-2015 11:22 PM |
Can I develop a plugin in a launguage other than Python? | jamawg | Development | 2 | 06-13-2014 12:38 AM |
Calibre in a Python 3.2 world, attn: Kovid | Kevin McAleavey | Calibre | 8 | 01-09-2012 05:49 PM |
How do I Create a Python Plugin? | Sydney's Mom | Plugins | 25 | 01-27-2010 06:26 AM |