# \[SOLVED\] Calibre can not locate opf file

**URL:** <https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133>\
**Category:** Support\
**Created:** [October 11, 2020, 5:33am UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133 "2020-10-11T05:33:34Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikaelB](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@MikaelB](https://discuss.freedombox.org/u/MikaelB)\
**Post date:** [October 11, 2020, 5:33am UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/1 "2020-10-11T05:33:34Z")

</div>

**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**

 ![Bildschirmfoto von 2020-10-11 07-29-48](https://discuss.freedombox.org/uploads/default/original/1X/07e56fd65f197ef9a6509bc7b8628f84997d0449.png)

**Information**

- _FreedomBox version_: 20.15
- _Hardware_: Freedombox Pioneer Edition
- _How did you install FreedomBox?_: bought pre-installed hardware

---

<div class="post-metadata">

**Author:** ![wromey](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@wromey](https://discuss.freedombox.org/u/wromey)\
**Post date:** [October 11, 2020, 4:22pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/2 "2020-10-11T16:22:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)\
**Post date:** [October 11, 2020, 5:13pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/3 "2020-10-11T17:13:17Z")

</div>

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](https://salsa.debian.org/freedombox-team/freedombox/-/issues/1975)

---

<div class="post-metadata">

**Author:** ![njoseph](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/njoseph/32/17_2.png) [@njoseph](https://discuss.freedombox.org/u/njoseph)\
**Post date:** [October 16, 2020, 4:07pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/4 "2020-10-16T16:07:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![njoseph](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/njoseph/32/17_2.png) [@njoseph](https://discuss.freedombox.org/u/njoseph)\
**Post date:** [October 16, 2020, 4:51pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/5 "2020-10-16T16:51:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![njoseph](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/njoseph/32/17_2.png) [@njoseph](https://discuss.freedombox.org/u/njoseph)\
**Post date:** [October 16, 2020, 5:24pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/6 "2020-10-16T17:24:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)\
**Post date:** [October 16, 2020, 7:07pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/7 "2020-10-16T19:07:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hanstux](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/h/45deac/32.png) [@hanstux](https://discuss.freedombox.org/u/hanstux)\
**Post date:** [October 23, 2020, 8:04pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/8 "2020-10-23T20:04:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)\
**Post date:** [October 26, 2020, 1:54pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/9 "2020-10-26T13:54:19Z")

</div>

Is there any logfile for calibre-server-freedombox?

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

---

<div class="post-metadata">

**Author:** ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)\
**Post date:** [November 22, 2020, 9:47am UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/10 "2020-11-22T09:47:29Z")

</div>

I just want to add some findings regarding the calibre server.

[calibre - Download for Linux](https://calibre-ebook.com/download_linux) states:

> The latest release of calibre is 5.5.0. What’s new.
> 
> Please do not use your distribution provided calibre package, as those are often buggy/outdated. Instead use the Binary install described below.

Debian10’s package is still on 3.39.1 and - as you mentioned before - broken on several features. Which is maybe understandable in regard to another statement on the same page:

> WARNING: calibre is a highly complex piece of software with lots of very finicky dependencies.

Building a newer package for ARM-based devices doesn’t seem to be trivial, as developer warns ([MobileRead Forums - View Single Post - How to get Calibre 3 running on Raspberry Pi 3 running Raspbian Jessie?](https://www.mobileread.com/forums/showpost.php?p=3549486&postcount=2)):

> You would need to build calibre and all its dependencies by hand, using cross compilation for ARM.

Here is what the debian maintainer reported about Calibre in Debian in general last year.

> **[State of Calibre in Debian | There and back again](https://www.preining.info/blog/2019/10/state-of-calibre-in-debian/)**
>
> To counter some recent FUD spread about Calibre in general and Calibre in Debian in particular, here a concise explanation of the current state. Many might have read my previous post on Calibre as a moratorium, but that was not my intention....

So it might take some time until we get it to work properly I guess?

---

<div class="post-metadata">

**Author:** ![njoseph](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/njoseph/32/17_2.png) [@njoseph](https://discuss.freedombox.org/u/njoseph)\
**Post date:** [November 22, 2020, 4:38pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/11 "2020-11-22T16:38:12Z")

</div>

Calibre 5.5.0 is likely to be available in the next stable release of Debian (Bullseye). It’s in unstable now.

---

<div class="post-metadata">

**Author:** ![lifeform](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@lifeform](https://discuss.freedombox.org/u/lifeform)\
**Post date:** [October 6, 2021, 12:22am UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/12 "2021-10-06T00:22:27Z")

</div>

This issue seems to have been solved by the version of Calibre (5.12.0) that came with the upgrade from buster to bullseye. I’m now able to use the web-based e-reader on epubs that failed before.

---

<div class="post-metadata">

**Author:** ![joseph](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@joseph](https://discuss.freedombox.org/u/joseph)\
**Post date:** [October 7, 2021, 4:46am UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/13 "2021-10-07T04:46:10Z")

</div>

I’m glad to see this, and was happy to confirm with at least one book on my FB. thanks!

---

<div class="post-metadata">

**Author:** ![hanstux](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/h/45deac/32.png) [@hanstux](https://discuss.freedombox.org/u/hanstux)\
**Post date:** [October 16, 2021, 8:25pm UTC](https://discuss.freedombox.org/t/solved-calibre-can-not-locate-opf-file/1133/14 "2021-10-16T20:25:38Z")

</div>

Same here. The upgrade to bullseye solved all my problems.
