[olive-gtk] ImportError: No module named viz.diffwin

Ben Lau xbenlau at gmail.com
Wed Jan 3 06:11:43 GMT 2007


Platform: Debian Etch

Bazaar version(Deb package):
bzr                                0.13-0ubuntu1
bzrtools                        0.13.0-0ubuntu1

Due to the absent of package python-nautilus in Debian Etch,  bzr-gtk
is installed by most updated source from launchpad. However, olive-gtk
failed to run with error message:

$ olive-gtk
Traceback (most recent call last):
  File "/usr/bin/olive-gtk", line 82, in ?
    from olive import OliveGtk
  File "/usr/lib/python2.4/site-packages/olive/__init__.py", line 55, in ?
    from viz.diffwin import DiffWindow
ImportError: No module named viz.diffwin

The error message is rather confusing.  By tracing the source code, I
found that it is caused by the fail to import GAnnotateWindow from
bzrlib.plugins.gtk.annotate.gannotate in the code below:

olive/__init__.py:

try:
    from bzrlib.plugins.gtk.viz.diffwin import DiffWindow
    from bzrlib.plugins.gtk.viz.branchwin import BranchWindow
    from bzrlib.plugins.gtk.annotate.gannotate import GAnnotateWindow
    from bzrlib.plugins.gtk.annotate.config import GAnnotateConfig
except ImportError:
    # olive+bzr-gtk not installed. try to import from sources
    path = os.path.dirname(os.path.dirname(__file__))
    if path not in sys.path:
        sys.path.append(path)
    from viz.diffwin import DiffWindow
    from viz.branchwin import BranchWindow
    from annotate.gannotate import GAnnotateWindow
    from annotate.config import GAnnotateConfig


The gannotate.py contains a line of code which try to import
NULL_REVISION , CURRENT_REVISION from bzrlib.revision. And it is the
source of error:

bzrlib/plugins/gtk/annotate/gannotate.py:

from bzrlib.revision import NULL_REVISION, CURRENT_REVISION

Commented the line could now execute olive-gtk in my machine. Should
it be considered as a bug or that is my own problem that caused by
incorrect installation(missed some package?)?




More information about the bazaar mailing list