Errors in book import in 2.10

Bug #1392864 reported by TonyV
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

Source:

Attempting to import using the "One book per directory" option
All book format containing folders have a cover.jpg, a metadata.opf and one, two, three or four format files ending in .epub, .mobi, etc.
There are 47 books (in their own folders) listed in 46 folders of the authors (i.e. root\author\book\format_files)

Outcome:

On import, an entry is created for 44 of the books, and in each case the .opf file is added as an extra format. In all except 12 cases, no other format is added to the book record other than the .opf.

Prior to the adding new book changes in version 2.10, the books would have been added correctly, and the .opf and .jpg files would have been ignored.

Edit to add:
If the .jpg, .opf and the format files have the same names all books are added, but the .opf is still added as an extra format.

Newly installed version 2.10; Windows 7 64bit;

TonyV (thny)
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1392864

The OPF is not an extra format, the OPF is used for a backup of the
calibre metadata.db. And has always been present in all versions of
calibre.

Regarding the rest of your bug report, are you saying that if you have a
folder with the files:

file1.epub
file2.mobi
file3.opf
file4.jpg

adding that folder as single book per directory results in no actual
book files being added?

Revision history for this message
Kovid Goyal (kovid) wrote :

To clarify, when you say the OPF file is added, do you mean it is added as a book format or that it is present in the added books directory? If the former, it is a bug, if the latter it is normal.

Revision history for this message
Kovid Goyal (kovid) wrote :

I was able to reproduce the problem of the extra OPF file being added when using single book per folder, (it will be fixed in the next release). But I cannot reproduce the rest of it. Adding a folder containing the files:

file1.epub
file2.mobi
file3.jpg
file4.opf

with single book per folder results in a book with formats epub and mobi and metadata from the OPF.

Revision history for this message
TonyV (thny) wrote : RE: [Bug 1392864] Re: calibre bug 1392864

I understand that OPF is not another format. Which is why this is a big issue.

With that combination of files, the OPF would definitely be added as a format; and, in my test case of 47 books, the actual format files, EPUB, etc. would only have been added in 12 cases.

This was tested by doing the same import 3/4 times, each with identical results.

-----Original Message-----
From: "Kovid Goyal" <email address hidden>
Sent: ‎2014-‎11-‎15 05:18
To: "<email address hidden>" <email address hidden>
Subject: [Bug 1392864] Re: calibre bug 1392864

The OPF is not an extra format, the OPF is used for a backup of the
calibre metadata.db. And has always been present in all versions of
calibre.

Regarding the rest of your bug report, are you saying that if you have a
folder with the files:

file1.epub
file2.mobi
file3.opf
file4.jpg

adding that folder as single book per directory results in no actual
book files being added?

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

Title:
  Errors in book import in 2.10

Status in calibre: e-book management:
  New

Bug description:
  Source:

  Attempting to import using the "One book per directory" option
  All book format containing folders have a cover.jpg, a metadata.opf and one, two, three or four format files ending in .epub, .mobi, etc.
  There are 47 books (in their own folders) listed in 46 folders of the authors (i.e. root\author\book\format_files)

  Outcome:

  On import, an entry is created for 44 of the books, and in each case
  the .opf file is added as an extra format. In all except 12 cases, no
  other format is added to the book record other than the .opf.

  Prior to the adding new book changes in version 2.10, the books would
  have been added correctly, and the .opf and .jpg files would have been
  ignored.

  Edit to add:
  If the .jpg, .opf and the format files have the same names all books are added, but the .opf is still added as an extra format.

  Newly installed version 2.10; Windows 7 64bit;

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

Revision history for this message
Kovid Goyal (kovid) wrote :

Again, the OPF format being added bug has been fixed. I cannot reproduce format files not being added. I suggest looking at the debug log (right click preferences and choose restart calibre in debug mode).

Revision history for this message
TonyV (thny) wrote : RE: [Bug 1392864] Re: Errors in book import in 2.10

I will re-import and check the debug log when I am back in front of my PC.

There does not seem to be a pattern as to which are imported and which not. I think, other than running the debug, it is better I wait for the OPF fix and run it against the same set of files.

Will the fix be available in next Friday's release?

Thank you for your prompt assistance.

-----Original Message-----
From: "Kovid Goyal" <email address hidden>
Sent: ‎2014-‎11-‎15 07:40
To: "<email address hidden>" <email address hidden>
Subject: [Bug 1392864] Re: Errors in book import in 2.10

Again, the OPF format being added bug has been fixed. I cannot reproduce
format files not being added. I suggest looking at the debug log (right
click preferences and choose restart calibre in debug mode).

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

Title:
  Errors in book import in 2.10

Status in calibre: e-book management:
  New

Bug description:
  Source:

  Attempting to import using the "One book per directory" option
  All book format containing folders have a cover.jpg, a metadata.opf and one, two, three or four format files ending in .epub, .mobi, etc.
  There are 47 books (in their own folders) listed in 46 folders of the authors (i.e. root\author\book\format_files)

  Outcome:

  On import, an entry is created for 44 of the books, and in each case
  the .opf file is added as an extra format. In all except 12 cases, no
  other format is added to the book record other than the .opf.

  Prior to the adding new book changes in version 2.10, the books would
  have been added correctly, and the .opf and .jpg files would have been
  ignored.

  Edit to add:
  If the .jpg, .opf and the format files have the same names all books are added, but the .opf is still added as an extra format.

  Newly installed version 2.10; Windows 7 64bit;

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

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1392864

Yes, it will.

Revision history for this message
Kovid Goyal (kovid) wrote :

When you do the add multiple times, are the same ones always not
imported or different ones each time?

Revision history for this message
TonyV (thny) wrote : RE: [Bug 1392864] Re: calibre bug 1392864

Identical every time.

-----Original Message-----
From: "Kovid Goyal" <email address hidden>
Sent: ‎2014-‎11-‎15 09:12
To: "<email address hidden>" <email address hidden>
Subject: [Bug 1392864] Re: calibre bug 1392864

When you do the add multiple times, are the same ones always not
imported or different ones each time?

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

Title:
  Errors in book import in 2.10

Status in calibre: e-book management:
  New

Bug description:
  Source:

  Attempting to import using the "One book per directory" option
  All book format containing folders have a cover.jpg, a metadata.opf and one, two, three or four format files ending in .epub, .mobi, etc.
  There are 47 books (in their own folders) listed in 46 folders of the authors (i.e. root\author\book\format_files)

  Outcome:

  On import, an entry is created for 44 of the books, and in each case
  the .opf file is added as an extra format. In all except 12 cases, no
  other format is added to the book record other than the .opf.

  Prior to the adding new book changes in version 2.10, the books would
  have been added correctly, and the .opf and .jpg files would have been
  ignored.

  Edit to add:
  If the .jpg, .opf and the format files have the same names all books are added, but the .opf is still added as an extra format.

  Newly installed version 2.10; Windows 7 64bit;

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

Revision history for this message
Kovid Goyal (kovid) wrote :

Then the debug log might shed some illumination.

It would also help if you could zip up one of these folders and attach it so I can try to reproduce

Revision history for this message
TonyV (thny) wrote : Re: [Bug 1392864] Re: Errors in book import in 2.10

Problem sorted. Or at least understood. The names/paths of the files are
too long, and those are not imported. Not sure whether that is source or
destination path; although I have a feeling that it is source path.

On 2014/11/15 10:54 AM, Kovid Goyal wrote:
> Then the debug log might shed some illumination.
>
> It would also help if you could zip up one of these folders and attach
> it so I can try to reproduce
>

Revision history for this message
Kovid Goyal (kovid) wrote :

calibre automatically ensures that the destination path is not too long, and as far as I know that part of the code was not touched in 2.10. It should be an easy test, simply copy one of those source folders to a location like c:\books (so that the total path length is less than 255 characters) and try adding.

Revision history for this message
TonyV (thny) wrote :

I actually tried that test. And you are correct; the files copied perfectly. So it seems that the source path is the issue. But not an insurmountable issue.

Thank you for a great product and wonderful follow-up.

-----Original Message-----
From: "Kovid Goyal" <email address hidden>
Sent: ‎2014-‎11-‎15 12:52
To: "<email address hidden>" <email address hidden>
Subject: [Bug 1392864] Re: Errors in book import in 2.10

calibre automatically ensures that the destination path is not too long,
and as far as I know that part of the code was not touched in 2.10. It
should be an easy test, simply copy one of those source folders to a
location like c:\books (so that the total path length is less than 255
characters) and try adding.

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

Title:
  Errors in book import in 2.10

Status in calibre: e-book management:
  New

Bug description:
  Source:

  Attempting to import using the "One book per directory" option
  All book format containing folders have a cover.jpg, a metadata.opf and one, two, three or four format files ending in .epub, .mobi, etc.
  There are 47 books (in their own folders) listed in 46 folders of the authors (i.e. root\author\book\format_files)

  Outcome:

  On import, an entry is created for 44 of the books, and in each case
  the .opf file is added as an extra format. In all except 12 cases, no
  other format is added to the book record other than the .opf.

  Prior to the adding new book changes in version 2.10, the books would
  have been added correctly, and the .opf and .jpg files would have been
  ignored.

  Edit to add:
  If the .jpg, .opf and the format files have the same names all books are added, but the .opf is still added as an extra format.

  Newly installed version 2.10; Windows 7 64bit;

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

Kovid Goyal (kovid)
Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.