calibre package has bad softlink / IOError: cannot open resource

Bug #1037168 reported by Chris Bainbridge
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
calibre (Debian)
Fix Released
Unknown
calibre (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

calibre looks in wrong directory for font

$ ebook-convert x.recipe x.txt

Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/web/feeds/news.py", line 1033, in build_index
    self.default_masthead_image(self.masthead_path)
  File "/usr/lib/calibre/calibre/web/feeds/news.py", line 1216, in default_masthead_image
    width=self.MI_WIDTH, height=self.MI_HEIGHT)
  File "/usr/lib/calibre/calibre/ebooks/__init__.py", line 244, in generate_masthead
    font = ImageFont.truetype(default_font, 48, encoding='unic')
  File "/home/chrb/bin/pil-116/lib/python2.5/site-packages/PIL/ImageFont.py", line 205, in truetype
    return FreeTypeFont(filename, size, index, encoding)
  File "/home/chrb/bin/pil-116/lib/python2.5/site-packages/PIL/ImageFont.py", line 121, in __init__
    self.font = _imagingft.getfont(file, size, index, encoding)
IOError: cannot open resource

# Calibre is trying to load /usr/share/calibre/fonts/liberation/LiberationSerif-Bold.ttf because in ebooks/__init__.py we have
# font_path = default_font = P('fonts/liberation/LiberationSerif-Bold.ttf')

$ ls -l /usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf
-rw-r--r-- 1 root root 144K Jul 12 22:12 /usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf

$ ls -l /usr/share/calibre/fonts/liberation
lrwxrwxrwx 1 root root 35 Feb 10 2012 /usr/share/calibre/fonts/liberation -> ../../fonts/truetype/ttf-liberation

$ ls -H /usr/share/calibre/fonts/liberation
ls: cannot access /usr/share/calibre/fonts/liberation: No such file or directory

So calibre includes a softlink that points to nothing; "ttf-liberation" should be just "liberation".

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: calibre 0.8.38+dfsg-1
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Wed Aug 15 16:37:40 2012
PackageArchitecture: all
SourcePackage: calibre
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in calibre (Ubuntu):
status: New → Confirmed
Revision history for this message
Pobice (robert-pobice) wrote :

Looks like Debian had the same issue: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674838

This also breaks the new fetch feature for me and I suspect has been the cause of some of the other reported bugs and crashes.

After manually correcting the symlink /usr/share/calibre/fonts/liberation to point to ../../fonts/truetype/liberation/ calibre is working again for me.

Changed in calibre (Debian):
status: Unknown → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

This is fixed as described. Verified on trusty. Thank you for reporting.

Changed in calibre (Ubuntu):
status: Confirmed → 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.