Selection of external viewer

Bug #1532015 reported by abde
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

When trying to set the external viewer for opening PDF files:

calibre 2.48 isfrozen: False is64bit: False
Linux-4.3.0-1-686-pae-i686-with-debian-stretch-sid Linux ('32bit', 'ELF')
('Linux', '4.3.0-1-686-pae', '#1 SMP Debian 4.3.3-2 (2015-12-17)')
Python 2.7.11
Linux: ('debian', 'stretch/sid', '')
Successfully initialized third party plugins: Count Pages
Traceback (most recent call last):
  File "/usr/lib/calibre/calibre/gui2/open_with.py", line 282, in programs_found
    entry_to_item(entry, self.plist)
  File "/usr/lib/calibre/calibre/gui2/open_with.py", line 187, in entry_to_item
    ans = QListWidgetItem(QIcon(icon_path), entry.get('Name') or _('Unknown'), parent)
TypeError: QIcon(): argument 1 has unexpected type 'dict'

MEGA UGGLY FIX:
in File "/usr/lib/calibre/calibre/gui2/open_with.py", line 187
        replaced line ans = QListWidgetItem(QIcon(icon_path), entry.get('Name') or _('Unknown'), parent)
        by ans = QListWidgetItem(QIcon('/somewhere/somefile.png'), entry.get('Name') or _('Unknown'), parent)

Hope this help to find a solution

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1532015

That indicates you have some broken icon theme on your system, stick
some print statements into read_icon_theme_dir() function in
open_with/linux.py to see why it is returning an icon as a dictionary
instead of a path. Also change the if on line 132 to be always true and
then run:

calibre-debug -c "from calibre.utils.open_with.linux import *; find_icons()"

the print statements should tell us what the problematic icon theme
dorectory is, then you can attach it to this ticket and I will take a
look.

 status incomplete

Changed in calibre:
status: New → Incomplete
Revision history for this message
Kovid Goyal (kovid) wrote :

It could also be a malformed desktop file, which you can check by
sticking some print statements after line 187

Revision history for this message
Kovid Goyal (kovid) wrote :

no followup

Changed in calibre:
status: Incomplete → Invalid
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.