← Back to team overview

edubuntu-bugs team mailing list archive

[Bug 1274318] [NEW] Type error on launch

 

Public bug reported:

if I start calibre, this is what I get.

orri@asuka:~$ calibre
Traceback (most recent call last):
  File "/usr/bin/calibre", line 20, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/gui2/main.py", line 447, in main
    gui_debug=gui_debug)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 312, in run_gui
    app.load_builtin_fonts(scan_for_fonts=True)
  File "/usr/lib/calibre/calibre/gui2/__init__.py", line 837, in load_builtin_fonts
    from calibre.utils.fonts.scanner import font_scanner
  File "/usr/lib/calibre/calibre/utils/fonts/scanner.py", line 377, in <module>
    font_scanner = Scanner()
  File "/usr/lib/calibre/calibre/utils/fonts/scanner.py", line 115, in __init__
    self.folders = folders + font_dirs() + [os.path.join(config_dir, 'fonts'),
TypeError: can only concatenate list (not "function") to list
orri@asuka:~$ calibre --version
calibre (calibre 1.0)
orri@asuka:~$ 

I am using ubuntu 13.10
I've tried uninstalling and installing (using apt-get) and I've tried deleting ~/Calibre Library


I found a fix:

in the function "fc_list" in /usr/lib/calibre/calibre/utils/fonts/scanner.py
approximately line 74 (I've edited my local version)
the line containing:
 "return default_font_dirs  "
can be changed to:
" return default_font_dirs()"

Then the function "default_font_dirs" is called and its return value is returned (by fc_list)
previously it (fc_list) would return a pointer to the function, which can not be concatinated with a list of strings.

Best regards,
Orri Tomasson

** Affects: calibre (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Edubuntu
Bugsquad, which is subscribed to calibre in Ubuntu.
https://bugs.launchpad.net/bugs/1274318

Title:
  Type error on launch

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


Follow ups

References