error starting webbrowser.GenericBrowser in python2.4

Bug #237205 reported by Sergey Petrunia
4
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Fix Released
Medium
Sabin Iacob

Bug Description

bzr visualize command fails on suse 10.1. It doesn't display any window but instead shows the below message and exits

$ bzr visualize
bzr: ERROR: exceptions.ValueError: need more than 1 value to unpack

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/user/.bazaar/plugins/gtk/__init__.py", line 266, in run
    pp = start_viz_window(br, revids, limit)
  File "/home/user/.bazaar/plugins/gtk/__init__.py", line 234, in start_viz_window
    from viz import BranchWindow
  File "/home/user/.bazaar/plugins/gtk/viz/__init__.py", line 14, in ?
    from branchwin import BranchWindow
  File "/home/user/.bazaar/plugins/gtk/viz/branchwin.py", line 18, in ?
    from bzrlib.plugins.gtk.tags import AddTagDialog
  File "/home/user/.bazaar/plugins/gtk/tags.py", line 27, in ?
    from bzrlib.plugins.gtk.revisionview import RevisionView
  File "/home/user/.bazaar/plugins/gtk/revisionview.py", line 41, in ?
    webbrowser.register('sensible-browser', None, webbrowser.GenericBrowser('sensible-browser'), -1)
  File "/usr/lib/python2.4/webbrowser.py", line 97, in __init__
    self.name, self.args = cmd.split(None, 1)
ValueError: need more than 1 value to unpack

bzr 1.5 on python 2.4.2 (linux2)
arguments: ['/usr/bin/bzr', 'visualize']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  difftools /home/user/.bazaar/plugins/difftools [0.91.0]
  extmerge /home/user/.bazaar/plugins/extmerge [unknown]
  gtk /home/user/.bazaar/plugins/gtk [0.95.0dev1]
  launchpad /usr/lib/python2.4/site-packages/bzrlib/plugins/launchpad [unknown]
  mysql /home/user/.bazaar/plugins/mysql [0.3.7]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

$

The output of bzr --version is included above. Contents of ~/.bzr.log as follows:
this is a debug log for diagnosing/reporting problems in bzr
you can delete or truncate this file, or include sections in
bug reports to https://bugs.launchpad.net/bzr/+filebug

0.150 encoding stdout as sys.stdout encoding 'UTF-8'
0.151 bzr arguments: [u'visualize']
0.151 looking for plugins in /home/user/.bazaar/plugins
0.212 importmbox not available unless bzrtools is installed
0.253 looking for plugins in /usr/lib/python2.4/site-packages/bzrlib/plugins
0.253 Plugin name gtk already loaded
0.253 Plugin name __init__ already loaded
0.253 Plugin name __init__ already loaded
0.258 encoding stdout as sys.stdout encoding 'UTF-8'
0.633 WARNING: using slower ElementTree; consider installing cElementTree and make sure it's on your PYTHONPATH
0.673 Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/user/.bazaar/plugins/gtk/__init__.py", line 266, in run
    pp = start_viz_window(br, revids, limit)
  File "/home/user/.bazaar/plugins/gtk/__init__.py", line 234, in start_viz_window
    from viz import BranchWindow
  File "/home/user/.bazaar/plugins/gtk/viz/__init__.py", line 14, in ?
    from branchwin import BranchWindow
  File "/home/user/.bazaar/plugins/gtk/viz/branchwin.py", line 18, in ?
    from bzrlib.plugins.gtk.tags import AddTagDialog
  File "/home/user/.bazaar/plugins/gtk/tags.py", line 27, in ?
    from bzrlib.plugins.gtk.revisionview import RevisionView
  File "/home/user/.bazaar/plugins/gtk/revisionview.py", line 41, in ?
    webbrowser.register('sensible-browser', None, webbrowser.GenericBrowser('sensible-browser'), -1)
  File "/usr/lib/python2.4/webbrowser.py", line 97, in __init__
    self.name, self.args = cmd.split(None, 1)
ValueError: need more than 1 value to unpack

0.675 return code 4

Additional details:
* If I run "bzr gcommit" it works ok - commit window shows up, I'm able to type in comments and it successfully commits
* bzr-gtk was installed using MySQL's standard bzr setup procedure. I also followed the same procedure on openSuse 10.3 and "bzr visualize" works without any problems here. Does bzr-gtk have some hidden dependencies that suse 10.1 doesn't meet but 10.3 does?

Revision history for this message
Martin Pool (mbp) wrote :

This bug is in bzr-gtk.

I believe there was recently a change to how the web browser is started; I'm not sure if it would fix this problem.

Changed in bzr:
importance: Undecided → Medium
Revision history for this message
Sabin Iacob (iacobs) wrote :

mine... it appears that the python 2.5 webbrowser.register is slightly different from the python 2.4 webbrowser.register

Changed in bzr-gtk:
assignee: nobody → iacobs
status: New → In Progress
Sabin Iacob (iacobs)
Changed in bzr-gtk:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-gtk:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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