Importing `webbrowser` module gives NameError in Python 2.7.4rc1

Bug #1159737 reported by Marcin Juszkiewicz on 2013-03-25
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python2.7 (Debian)
python2.7 (Ubuntu)
Anatoli Yakimovich

Bug Description

12:23 hrw@puchatek:lava-test-perf$ python -c "import webbrowser"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/", line 505, in <module>
  File "/usr/lib/python2.7/", line 489, in register_X_browsers
    register(browser, None, Chrome(browser))
NameError: global name 'Chrome' is not defined

Real life usecase:

12:26 hrw@puchatek:lava-test-perf$ bzr lp-propose-merge
bzr: ERROR: exceptions.NameError: global name 'Chrome' is not defined

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 673, in run_argv_aliases
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/", line 328, in run
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/", line 76, in __init__
    self.launchpad = lp_api.login(service)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 108, in __getattribute__
    obj = object.__getattribute__(self, '_resolve')()
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 85, in _resolve
    obj = factory(self, scope, name)
  File "/usr/lib/python2.7/dist-packages/bzrlib/", line 200, in _import
    module = __import__(module_python_path, scope, scope, [member], level=0)
  File "/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/", line 48, in <module>
    from launchpadlib.launchpad import (
  File "/usr/lib/python2.7/dist-packages/launchpadlib/", line 36, in <module>
    from launchpadlib.credentials import (
  File "/usr/lib/python2.7/dist-packages/launchpadlib/", line 40, in <module>
    import webbrowser
  File "/usr/lib/python2.7/", line 505, in <module>
  File "/usr/lib/python2.7/", line 489, in register_X_browsers
    register(browser, None, Chrome(browser))
NameError: global name 'Chrome' is not defined

bzr 2.6.0dev3 on python 2.7.4rc1 (Linux-3.8.0-13-generic-x86_64-with-
arguments: ['/usr/bin/bzr', 'lp-propose-merge']
plugins: bash_completion[2.6.0dev3], builddeb[2.7.0dev], builder[0.7.3],
    changelog_merge[2.6.0dev3], etckeeper[unknown], extmerge[unknown],
    fastimport[0.13.0], git[0.6.9], grep[2.6.0dev3], interactive[1.2.0],
    launchpad[2.6.0dev3], loom[2.2.0], netrc_credential_store[2.6.0dev3],
    news_merge[2.6.0dev3], pager[unknown], pipeline[1.4.0],
    po_merge[2.6.0dev3], qbzr[0.23.0], rewrite[0.6.4dev], search[1.7.0dev],
    stats[0.2.0dev], vimdiff[unknown], weave_fmt[2.6.0dev3]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'pl_PL.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
    including this traceback and a description of the problem.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: python2.7 2.7.4~rc1-2ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-13.22-generic 3.8.3
Uname: Linux 3.8.0-13-generic x86_64
ApportVersion: 2.9.2-0ubuntu2
Architecture: amd64
Date: Mon Mar 25 12:26:00 2013
MarkForUpload: True
 PATH=(custom, no user)
SourcePackage: python2.7
UpgradeStatus: No upgrade log present (probably fresh install)

Marcin Juszkiewicz (hrw) wrote :
xelatirdan (xelatirdan) on 2013-03-25
no longer affects: ubuntuone-client
Changed in python2.7 (Debian):
status: Unknown → New
Changed in python:
status: Unknown → New
Changed in python2.7 (Ubuntu):
assignee: nobody → Anatoli Yakimovich (akelav)
Daniel Holbach (dholbach) wrote :

It looks like the class definition of Chrome/Chromium in python3.3's Lib/ is missing.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python2.7 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.