When opening a file via webbrowser.open_new_tab, we use the file URI with the format: file://{fname}. Here fname must be a full path, as shown below.
In [1]: import webbrowser
In [2]: webbrowser.open_new_tab("basemap.pdf")
Out[2]: True
In [3]: webbrowser.open_new_tab("file://basemap.pdf")
Out[3]: True
In [4]: gio: file://basemap.pdf: Operation not supported
When opening a file via
webbrowser.open_new_tab
, we use the file URI with the format:file://{fname}
. Herefname
must be a full path, as shown below.This PR fixes the bug.