Using pythons webbrowser.open in snaped applications

Change to “core candidate” as a first try:
snap refresh --candidate

After that you might need to use:
sudo /usr/lib/snapd/snap-discard-ns SNAP_NAME

For details have a look at xdg-open-regression.