Edit Book feature results in error after previously editing successfully

Bug #1740460 reported by Jeramy Goble on 2017-12-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

Windows 10 Home
Calibre version 3.14.0

I'm not sure what causes this, and not sure how to reproduce it. I've spent hours successfully using the "Edit Book" feature to modify an .EPUB, and then randomly, after closing the program and re-opening it at a later time, I'll get the error below when I try to perform "Edit Book" again. I've tried re-installing Calibre, creating a copy of the library and re-importing it--all of which result in the same error. This is now the 2nd time I've applied revisions to a 103k word novel and can't access the data.

calibre, version 3.14.0
ERROR: Failed to open book: Failed to open book, click "Show details" for more information.

Traceback (most recent call last):
  File "site-packages\calibre\gui2\tweak_book\job.py", line 35, in run
  File "site-packages\calibre\gui2\tweak_book\boss.py", line 59, in get_container
  File "site-packages\calibre\ebooks\oeb\polish\container.py", line 1497, in get_container
  File "site-packages\calibre\ebooks\oeb\polish\container.py", line 1155, in __init__
InvalidEpub: No META-INF/container.xml in epub

That error indicates a corrupted EPUB file. The only way I know of for
that to happen is if you have some program that deletes temporary files
used by calibre while calibre is still running. Common culprits are temp
file cleaners, performance "boosters" and the like. If you cannot figure
out what is causing it, you can try setting the CALIBRE_TEMP_DIR
environment variable to point to some directory like c:\workaround which
hopefully will not be auto-cleaned.

 status invalid

Changed in calibre:
status: New → Invalid

Thanks for the quick reply, Kovid! I don't use any of those auto-file/cache cleaners. I don't trust them for exactly reasons like this. ๐Ÿ˜‰ It was strange. I worked on the book for a bit in the Edit Book feature, closed down. Opened Calibre back up about 20 minutes later, went to Edit Book again, and got that error.

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Kovid Goyal
Sent: Friday, December 29, 2017 12:29 AM
To: <email address hidden>
Subject: [Bug 1740460] Re: calibre bug 1740460

That error indicates a corrupted EPUB file. The only way I know of for that to happen is if you have some program that deletes temporary files used by calibre while calibre is still running. Common culprits are temp file cleaners, performance "boosters" and the like. If you cannot figure out what is causing it, you can try setting the CALIBRE_TEMP_DIR environment variable to point to some directory like c:\workaround which hopefully will not be auto-cleaned.

 status invalid

** Changed in: calibre
       Status: New => Invalid

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/1740460

Title:
  Edit Book feature results in error after previously editing
  successfully

Status in calibre:
  Invalid

Bug description:
  Windows 10 Home
  Calibre version 3.14.0

  I'm not sure what causes this, and not sure how to reproduce it. I've
  spent hours successfully using the "Edit Book" feature to modify an
  .EPUB, and then randomly, after closing the program and re-opening it
  at a later time, I'll get the error below when I try to perform "Edit
  Book" again. I've tried re-installing Calibre, creating a copy of the
  library and re-importing it--all of which result in the same error.
  This is now the 2nd time I've applied revisions to a 103k word novel
  and can't access the data.

  calibre, version 3.14.0
  ERROR: Failed to open book: Failed to open book, click "Show details" for more information.

  Traceback (most recent call last):
    File "site-packages\calibre\gui2\tweak_book\job.py", line 35, in run
    File "site-packages\calibre\gui2\tweak_book\boss.py", line 59, in get_container
    File "site-packages\calibre\ebooks\oeb\polish\container.py", line 1497, in get_container
    File "site-packages\calibre\ebooks\oeb\polish\container.py", line 1155, in __init__
  InvalidEpub: No META-INF/container.xml in epub

To manage notifications about this bug go to:
https://bugs.launchpad.net/calibre/+bug/1740460/+subscriptions

WEll, I've made a change for the next release that causes the editor to
refuse to save books where critical files have been deleted and got it
to use the cache directory rather than the temp directory, so that
should fix it.

Sounds good! Love the software. Thanks for all that you do on it!

On Dec 29, 2017 9:00 AM, "Kovid Goyal" <email address hidden> wrote:

> WEll, I've made a change for the next release that causes the editor to
> refuse to save books where critical files have been deleted and got it
> to use the cache directory rather than the temp directory, so that
> should fix it.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1740460
>
> Title:
> Edit Book feature results in error after previously editing
> successfully
>
> Status in calibre:
> Invalid
>
> Bug description:
> Windows 10 Home
> Calibre version 3.14.0
>
> I'm not sure what causes this, and not sure how to reproduce it. I've
> spent hours successfully using the "Edit Book" feature to modify an
> .EPUB, and then randomly, after closing the program and re-opening it
> at a later time, I'll get the error below when I try to perform "Edit
> Book" again. I've tried re-installing Calibre, creating a copy of the
> library and re-importing it--all of which result in the same error.
> This is now the 2nd time I've applied revisions to a 103k word novel
> and can't access the data.
>
> calibre, version 3.14.0
> ERROR: Failed to open book: Failed to open book, click "Show details"
> for more information.
>
> Traceback (most recent call last):
> File "site-packages\calibre\gui2\tweak_book\job.py", line 35, in run
> File "site-packages\calibre\gui2\tweak_book\boss.py", line 59, in
> get_container
> File "site-packages\calibre\ebooks\oeb\polish\container.py", line
> 1497, in get_container
> File "site-packages\calibre\ebooks\oeb\polish\container.py", line
> 1155, in __init__
> InvalidEpub: No META-INF/container.xml in epub
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/calibre/+bug/1740460/+subscriptions
>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers