Calibre can not locate opf file

Problem Description
If i try to read a e-book in webbrowser from FB Calibre Libraries i get an error

Steps to Reproduce

  1. Login to FreedomBox
  2. Go to Calibre application page
  3. Click on your Library
  4. Select uploaded e-book
  5. Click on read this book

Expected Results
open the e-book

Actual results
I get an error with the following message:

Traceback (most recent call last):
File “/usr/lib/calibre/calibre/utils/ipc/simple_worker.py”, line 289, in main
res = {‘result’:func(*args, **kwargs)}
File “/usr/lib/calibre/calibre/srv/render_book.py”, line 524, in render
Container(pathtoebook, output_dir, book_hash=book_hash)
File “/usr/lib/calibre/calibre/srv/render_book.py”, line 178, in init
ContainerBase.init(self, tdir, opfpath, log)
File “/usr/lib/calibre/calibre/ebooks/oeb/polish/container.py”, line 288, in init
raise InvalidBook(‘Could not locate opf file: %r’%opfpath)
InvalidBook: Could not locate opf file: u’/var/lib/private/calibre-server-freedombox/.cache/calibre/srvb/s/HxixE6/metadata.opf’

Screenshot

Information

  • FreedomBox version: 20.15
  • Hardware: Freedombox Pioneer Edition
  • How did you install FreedomBox?: bought pre-installed hardware
2 Likes

I expierienced the same. I have uploaded some pdf-files to calibre the I clicked on read and got the same result.

The information for my configuration is the same as for MikaelB.

1 Like

When doing the initial testing for the app, I did reading etc. on Debian testing. Didn’t test the app fully on stable. I created an issue for tracking this: https://salsa.debian.org/freedombox-team/freedombox/-/issues/1975

2 Likes

Usually an e-book’s folder in calibre has a cover.jpg and metadata.opf in addition to the e-book files in various formats.

I found that when an e-book is uploaded to FreedomBox calibre using the web interface, it seems to generate the cover.jpg file but not metadata.opf

I tested on Debian stable.

When I tested the same in a Debian testing container, I still found that the metadata.opf file is not generated. However, this doesn’t break the calibre web reader (version 5.2.0)

Might be worth testing on the buster-backports version too.

The calibre web reader on buster-backports is broken too. :zipper_mouth_face:

This is likely because of pdf2html (or something) from poppler project that Calibre uses to do the conversion.

Same here.
InvalidBook: Could not locate opf file: u’/var/lib/private/calibre-server-freedombox/.cache/calibre/srvb/s/LrWT0S/content.opf’
I wanted to look up the path via ssh, but /var/lib/private doesn’t exist, and for /var/lib/calibre-server-freedombox permission is denied. Whatever that means, just found it remarkable

1 Like

Is there any logfile for calibre-server-freedombox?

I looked at /var/log and by journalctl -xe but didn’t notice any related output.