Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Nov 25, 2024

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

This PR fixes the bug.

@seisman seisman added bug Something isn't working needs review This PR has higher priority and needs review. labels Nov 25, 2024
@seisman seisman added this to the 0.14.0 milestone Nov 25, 2024
@seisman seisman changed the title launch_external_viewer: Use full path when opening the file in a browser launch_external_viewer: Use full path when opening the file in a web browser Nov 25, 2024
@seisman seisman removed the needs review This PR has higher priority and needs review. label Nov 25, 2024
@seisman seisman merged commit a29d513 into main Nov 25, 2024
21 checks passed
@seisman seisman deleted the fix/launch_external_viewer branch November 25, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants