Fails to start if bzr can't load all plugins

Bug #519608 reported by Andrew Starr-Bochicchio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Confirmed
Low
Unassigned

Bug Description

I recently upgraded this machine to bzr 2.1.0~rc2, and bzr-explorer fails to start since some of my plugins are out-dated and fail to load. As none of these plugins are essential to bzr-explorer (evidenced by the fact that bzr-explorer will start if I simply uninstall the plugins rather than upgrade them), I'd expect to be able to continue using it without them. The bzr command-line client continues to work, simply warning me that these plugins failed to load. bzr-explorer should do the same.

andrew@andrew-laptop:~/Desktop$ bzr explorer
Unable to load plugin 'svn'. It requested API version (2, 0, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'git'. It requested API version (1, 18, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'gtk'. It requested API version (1, 17, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'rebase'. It requested API version (1, 17, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
bzr: ERROR: The API for "<module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'>" is not compatible with "(1, 17, 0)". It supports versions "(2, 1, 0)" to "(2, 1, 0)".

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 519608] [NEW] Fails to start if bzr can't load all plugins

Andrew Starr-Bochicchio пишет:
> Public bug reported:
>
> I recently upgraded this machine to bzr 2.1.0~rc2, and bzr-explorer
> fails to start since some of my plugins are out-dated and fail to load.

No, the real problem is that some bzrlib module around.

> andrew@andrew-laptop:~/Desktop$ bzr explorer
> Unable to load plugin 'svn'. It requested API version (2, 0, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
> Unable to load plugin 'git'. It requested API version (1, 18, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
> Unable to load plugin 'gtk'. It requested API version (1, 17, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)
> Unable to load plugin 'rebase'. It requested API version (1, 17, 0) of module <module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum exported version is (2, 1, 0), and the maximum is (2, 1, 0)

Unable to load plugin is harmless.

> bzr: ERROR: The API for "<module 'bzrlib' from '/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'>" is not compatible with "(1, 17, 0)". It supports versions "(2, 1, 0)" to "(2, 1, 0)".

This is real problem. Can you check your bzr script? Does it upgraded correctly?

Also please provides us traceback for this command from .bzr.log.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :
  • .bzr.log Edit (4.2 KiB, text/x-log; charset=US-ASCII; name=".bzr.log")

>> bzr: ERROR: The API for "<module 'bzrlib' from '/usr/lib/python2.6
> /dist-packages/bzrlib/__init__.pyc'>" is not compatible with "(1, 17,
> 0)". It supports versions "(2, 1, 0)" to "(2, 1, 0)".
>
> This is real problem. Can you check your bzr script? Does it upgraded
> correctly?

_script_version = (2, 1, 0)

>
> Also please provides us traceback for this command from .bzr.log.

Attached

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Ahh.. I see. In explorer/lib/app_suite.py we have:

try:
    import bzrlib.plugins.gtk
    app_suite_registry.register("gtk", ApplicationSuite("gtk",
        _GTK_STATELESS_MAPPING, _GTK_LOCAL_MAPPING, _GTK_REMOTE_MAPPING,
        fallbacks=['qbzr']),
        help="Applets from the bzr-gtk plugin")
except ImportError:
    pass

and in qbzr/lib/log.py we have:

try:
    from bzrlib.plugins.svn.repository import SvnRepository
    has_svn = True
except ImportError:
    has_svn = False

These will both cause explorer not to start as there is no
ImportError, but the plugins still can't be used.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :
  • .bzr.log Edit (8.2 KiB, text/x-log; charset=US-ASCII; name=".bzr.log")

Log with the qbzr traceback

Revision history for this message
Alexander Belchenko (bialix) wrote :

Andrew Starr-Bochicchio пишет:
> Ahh.. I see. In explorer/lib/app_suite.py we have:
>
> try:
> import bzrlib.plugins.gtk
> app_suite_registry.register("gtk", ApplicationSuite("gtk",
> _GTK_STATELESS_MAPPING, _GTK_LOCAL_MAPPING, _GTK_REMOTE_MAPPING,
> fallbacks=['qbzr']),
> help="Applets from the bzr-gtk plugin")
> except ImportError:
> pass
>
> and in qbzr/lib/log.py we have:
>
> try:
> from bzrlib.plugins.svn.repository import SvnRepository
> has_svn = True
> except ImportError:
> has_svn = False
>
>
> These will both cause explorer not to start as there is no
> ImportError, but the plugins still can't be used.

Sorry, but you're wrong. Both this construct will catch ImportError and
don't block Explorer. The messages you see:

Unable to load plugin 'svn'. It requested API version (2, 0, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'git'. It requested API version (1, 18, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'gtk'. It requested API version (1, 17, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)
Unable to load plugin 'rebase'. It requested API version (1, 17, 0) of
module <module 'bzrlib' from
'/usr/lib/python2.6/dist-packages/bzrlib/__init__.pyc'> but the minimum
exported version is (2, 1, 0), and the maximum is (2, 1, 0)

is generated by bzr itself when it loads plugins at startup, even before
command "explorer" is started.

Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, I've looked to your .bzr.log and see now that your analysis about ImportError is correct.

We can fix this in explorer and qbzr, but it seems actually installation issue. Once you'll have other plugins in correct versions this problem will gone.

Changed in bzr-explorer:
status: New → Confirmed
importance: Undecided → Low
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.