NameError: global name 'Chrome' is not defined [Ubuntu]

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

NameError: global name 'Chrome' is not defined [Ubuntu]

Post by sander »

I can't start SABnzbd. See below. Seems to be browser related, but "-b 0" doesn't help.

I have no Chrome; I've Chromium

Ubuntu 13.04 daily.

Code: Select all

sander@appelboor:~$ sabnzbdplus 
Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 67, in <module>
    import sabnzbd
  File "/usr/share/sabnzbdplus/sabnzbd/__init__.py", line 73, in <module>
    from sabnzbd.nzbqueue import NzbQueue
  File "/usr/share/sabnzbdplus/sabnzbd/nzbqueue.py", line 32, in <module>
    from sabnzbd.panic import panic_queue
  File "/usr/share/sabnzbdplus/sabnzbd/panic.py", line 24, in <module>
    import webbrowser
  File "/usr/lib/python2.7/webbrowser.py", line 505, in <module>
    register_X_browsers()
  File "/usr/lib/python2.7/webbrowser.py", line 489, in register_X_browsers
    register(browser, None, Chrome(browser))
NameError: global name 'Chrome' is not defined
sander@appelboor:~$ 


sander@appelboor:~$ 
sander@appelboor:~$ sabnzbdplus -b 0
Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 67, in <module>
    import sabnzbd
  File "/usr/share/sabnzbdplus/sabnzbd/__init__.py", line 73, in <module>
    from sabnzbd.nzbqueue import NzbQueue
  File "/usr/share/sabnzbdplus/sabnzbd/nzbqueue.py", line 32, in <module>
    from sabnzbd.panic import panic_queue
  File "/usr/share/sabnzbdplus/sabnzbd/panic.py", line 24, in <module>
    import webbrowser
  File "/usr/lib/python2.7/webbrowser.py", line 505, in <module>
    register_X_browsers()
  File "/usr/lib/python2.7/webbrowser.py", line 489, in register_X_browsers
    register(browser, None, Chrome(browser))
NameError: global name 'Chrome' is not defined
sander@appelboor:~$ 
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: NameError: global name 'Chrome' is not defined [Ubuntu]

Post by shypike »

Eh, Ubuntu daily version? Doesn't sound very stable to me :)

This is a mismatch between Python and the operating system.
"webbrowser" is a standard Python library which should "just work".
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: NameError: global name 'Chrome' is not defined [Ubuntu]

Post by sander »

Seems to be a bug in Ubuntu 13.04 https://bugs.launchpad.net/ubuntu/+sour ... ug/1159854

(and debian too? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703872 )

Code: Select all

sander@appelboor:~$ software-center
Traceback (most recent call last):
  File "/usr/bin/software-center", line 128, in <module>
    from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 37, in <module>
    import webbrowser
  File "/usr/lib/python2.7/webbrowser.py", line 505, in <module>
    register_X_browsers()
  File "/usr/lib/python2.7/webbrowser.py", line 489, in register_X_browsers
    register(browser, None, Chrome(browser))
NameError: global name 'Chrome' is not defined
sander@appelboor:~$
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: NameError: global name 'Chrome' is not defined [Ubuntu]

Post by sander »

http://bugs.python.org/issue17541

Just this one command triggers it:

Code: Select all

sander@appelboor:~$ python
Python 2.7.4rc1 (default, Mar 25 2013, 00:30:40) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/webbrowser.py", line 505, in <module>
    register_X_browsers()
  File "/usr/lib/python2.7/webbrowser.py", line 489, in register_X_browsers
    register(browser, None, Chrome(browser))
NameError: global name 'Chrome' is not defined
>>>
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: NameError: global name 'Chrome' is not defined [Ubuntu]

Post by sander »

As a workaround, I commented-out the "import webbrowser" in sabnzbd/panic.py and started

./SABnzbd.py -b0

... and that works ... :-)
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: NameError: global name 'Chrome' is not defined [Ubuntu]

Post by sander »

... and after yet another update it's solved.
Post Reply