Skip to content

calibre: Reading a PDF fails with OPF file not found error

Reported by MikaelB at https://discuss.freedombox.org/t/calibre-can-not-locate-opf-file/1133

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

Steps to Reproduce

  • Login to FreedomBox
  • Go to Calibre application page
  • Click on your Library
  • Select uploaded e-book
  • 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

Bildschirmfoto_von_2020-10-11_07-29-48

Edited by Fioddor Superconcentrado