Comment 2 for bug 1584470

Sorry, my bad. I expected the action to be opening a browser tab.
Instead the action was to open a file manager window, which I did not
notice, since the file manager already showed the expected directory.
However, I found another (presumed) bug: If the file path contains
special characters (e.g. Umlaut-ö) and I enter such an identifier via
"Edit Metadata" (e.g. adding "extern:Lexika/Bibliographie der
österreichischen Zeitschriften 1704-1850/"), after clicking "Ok" I get
an exception:

calibre, version 2.57.0
ERROR: Unhandled exception: <b>KeyError</b>:u'\xf6'

calibre 2.57 embedded-python: True is64bit: False
Linux-4.2.0-36-generic-i686-with-debian-jessie-sid Linux ('32bit', 'ELF')
('Linux', '4.2.0-36-generic', '#42-Ubuntu SMP Thu May 12 22:03:27 UTC 2016')
Python 2.7.9
Linux: ('debian', 'jessie/sid', '')
Successfully initialized third party plugins: DeDRM
Traceback (most recent call last):
  File "site-packages/calibre/gui2/", line 722, in show_data
  File "site-packages/calibre/gui2/", line 488, in show_data
  File "site-packages/calibre/gui2/", line 30, in render_html
  File "site-packages/calibre/gui2/", line 105, in
  File "site-packages/calibre/ebooks/metadata/book/", line 151,
in mi_to_html
  File "site-packages/calibre/ebooks/metadata/sources/", line
533, in urls_from_identifiers
  File "", line 1294, in quote
KeyError: u'\xf6'

The same exception is produced later every time, when I select the
corresponding book.

If I change the identifier to URL-encode the offending character (e.g.
"ö" → "%C3%B6"), the link does not work and there is no error indication.
The same happens, if there is an error in the path (e.g
"extern:Lexika/Bibliographie der sterreichischen Zeitschriften
FOOBAR/"). There should be some error indication. I would prefer, if all
URLs would be opened in a browser tab, because then the path and a "File
not found" error message would be shown in the browser tab.

Thank you for your quick response.

Greetings from Munich


On 22.05.2016 16:21, Kovid Goyal wrote:
> I cannot reproduce this, on my linux system. Steps I tried:
> 1) Click Edit metadata
> 2) Click the insert link button
> 3) Click the browse for file on your computer button
> 4) Choose a file
> 5) Click OK
> 6) The resulting link in the Book Details panel opens the previously selected file.
> Remember that for a file to be opened when you click it, you need to
> have a non-broken implementation of xdg-open on your system
> status invalid
> ** Changed in: calibre
> Status: New => Invalid