You are not logged in.

#1 2015-04-08 16:15:44

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 77

[SOLVED] [python] webbrowser module behaves differently on two OS

Hello,

I have an issue on the border of python programming and system configuration. It is related to the github issue I raised here. Briefly, on one of my Arch installation urlscan-git is broken and I cannot figure out why. I managed to slightly narrow down the problem by analysing the python code in urlscan. I have a simple application

#/bin/python
import webbrowser

url = '[url]http://docs.python.org/[/url]'

# Open URL in a new tab, if a browser window is already open.
webbrowser.open_new_tab(url)

On my laptop that code, when run from the commandline, runs Firefox with the correct address. On my desktop however, I get

file:///home/c111269/openURL(http://docs.python.org/,new-tab)

in my address bar.` Thiis behaviour depends on BROWSER environmental variable which is set to "firefox" on both machines. With "chromium" I get correct behaviour in both instances. I tried removing my personal settings in firefox but it didn't change anything.

Does anyone have some experience in programming these things and can give me a hint on what may be different in my system configurations?

Last edited by AlmostSurelyRob (2015-04-19 12:41:00)

Offline

#2 2015-04-10 18:39:51

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] [python] webbrowser module behaves differently on two OS

I think there's something weird with your environment, but I'm not sure...that's a pretty strange error. Try creating a new user on your box and running your test code from there. If it works, then you can start going through your normal user environment variables, checking for executables in your $PATH and checking for locally installed libraries to see if you can track down the issue.

Sorry I can't help more than that.

Scott

Offline

#3 2015-04-19 12:40:42

AlmostSurelyRob
Member
From: UK
Registered: 2012-03-17
Posts: 77

Re: [SOLVED] [python] webbrowser module behaves differently on two OS

Tried with the clean environment (new user) and it didn't help. The same problem. That prompted me to think that there's something with my python and or firefox, likely the other one. I've updated the system yesterday and the problem is gone. I am marking it as solved, although I haven't really found out what was causing it.

Offline

Board footer

Powered by FluxBB