|
|
#1 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Aug 2023
Device: kindle paperwhite 11
|
Hello! Sorry in advance if im posting in the wrong section! I am creating a python (3.11) script that converts epub to azw3 and im encountering an error that says "EPUB appears to be invalid ZIP file, trying a more forgiving ZIP parser". This occurs when running a command with subprocess.run. I suspected a corrupted file, however when i enter the command manually into the cli, the file sucessfully converts. To clarify, I copy paste the command obtained by python after "Running command: " into the cli and it works. I am unsure of whether this is a problem with my code or python itself when handling epub files or some kind of incompatibility with calibre... I was wondering if anybody has any suggestions to fix or workaround this error. Here is the code:
Spoiler:
Thank you for reading :) Last edited by theducks; 08-25-2023 at 11:36 PM. Reason: Please Spoiler Log files |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,690
Karma: 28549304
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
ebook-convert doesnt care about how it is launched. Most likely you are running you script before the download is completed leading to a partial/corrupted file being converted.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Aug 2023
Device: kindle paperwhite 11
|
Thanks so much its working now
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting ePub Python coding books to PDF outputs Python code far too small | lysakowski | Conversion | 9 | 04-30-2023 06:44 AM |
| Batch Converting Ebooks with Calibre and Python | jmeb | Conversion | 17 | 10-20-2018 12:16 PM |
| Changing the filetypes associated with KPVBooklet? | Gigahawk | Kindle Developer's Corner | 1 | 02-12-2016 09:11 AM |
| More filetypes? | Perkin | Editor | 1 | 11-25-2014 10:48 PM |
| Export - different filetypes | marcl | Calibre | 2 | 01-14-2014 06:30 AM |