12-17-2019, 02:18 PM | #16 |
Plugin Developer
Posts: 6,305
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
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.) |
12-17-2019, 03:08 PM | #17 |
Grand Sorcerer
Posts: 6,495
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I have a plugin that uses the following import:
Code:
from Crypto.Cipher import AES Spoiler:
|
Advert | |
|
12-17-2019, 04:14 PM | #18 |
Plugin Developer
Posts: 6,305
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
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. |
12-17-2019, 05:57 PM | #19 | |
Guru
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
|
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. |
|
12-17-2019, 08:12 PM | #20 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
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 | |
|
12-17-2019, 08:13 PM | #21 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
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. |
12-17-2019, 08:31 PM | #22 | |
Plugin Developer
Posts: 6,305
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
|
|
12-17-2019, 08:39 PM | #23 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
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
|
12-17-2019, 08:46 PM | #24 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
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.
|
12-17-2019, 09:09 PM | #25 |
creator of calibre
Posts: 43,835
Karma: 22666666
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
|
12-17-2019, 09:13 PM | #26 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
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. |
|
12-17-2019, 09:33 PM | #27 | ||
creator of calibre
Posts: 43,835
Karma: 22666666
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:
|
||
12-17-2019, 10:13 PM | #28 | |
Grand Sorcerer
Posts: 6,495
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
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. |
|
12-17-2019, 10:25 PM | #29 |
creator of calibre
Posts: 43,835
Karma: 22666666
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. |
12-17-2019, 11:43 PM | #30 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I uploaded 4.99.1 with fixes for all reported issues.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
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 |