bzr xmlrpc calls install_bzr_command_hooks on object without that attribute

Bug #417928 reported by Trevor Glen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
bzr-xmloutput
Won't Fix
Medium
Unassigned

Bug Description

From within eclipse I got this error:

"org.vcs.bazaar.client.core.BazaarClientException$BazaarUncheckedException: bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'install_bzr_command_hooks'

Traceback (most recent call last):
File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
return run_bzr(argv)
File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
ret = run(*run_argv)
File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
return self.run(**all_cmd_args)
File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 853, in ignore_pipe
result = func(*args, **kwargs)
File "/Users/tg/.bazaar/plugins/xmloutput/__init__.py", line 417, in run
self.server.serve_forever()
File "/Users/tg/.bazaar/plugins/xmloutput/service.py", line 86, in serve_forever
if getattr(commands, 'install_bzr_command_hooks'):
File "/opt/local/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 109, in __getattribute__
return getattr(obj, attr)
AttributeError: 'module' object has no attribute 'install_bzr_command_hooks'

bzr 1.9 on python 2.5.2 (darwin)
arguments: ['/opt/local/bin/bzr', 'start-xmlrpc']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
launchpad /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
xmloutput /Users/tg/.bazaar/plugins/xmloutput [0.8.5]
*** 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.

at org.vcs.bazaar.client.xmlrpc.internal.XMLRPCCommandRunner$XMLRPCServer.run(XMLRPCCommandRunner.java:86)
at org.vcs.bazaar.client.xmlrpc.internal.XMLRPCCommandRunner.checkServiceStatus(XMLRPCCommandRunner.java:223)
at org.vcs.bazaar.client.xmlrpc.internal.XMLRPCCommandRunner.<init>(XMLRPCCommandRunner.java:215)
at org.vcs.bazaar.client.xmlrpc.XmlRpcClient.<init>(XmlRpcClient.java:26)
at org.vcs.bazaar.client.xmlrpc.XmlRpcClientFactory.createClientImpl(XmlRpcClientFactory.java:26)
at org.vcs.bazaar.client.BazaarClientFactory.createClient(BazaarClientFactory.java:27)
at org.vcs.bazaar.eclipse.EclipseBazaarCore.createClient(Unknown Source)
at org.vcs.bazaar.eclipse.BzrWorkspaceRoot.getClient(Unknown Source)
at org.vcs.bazaar.eclipse.BzrWorkspaceRoot.getClient(Unknown Source)
at org.vcs.bazaar.eclipse.core.commands.BazaarCommand.getClient(Unknown Source)
at org.vcs.bazaar.eclipse.core.commands.LsCommand.run(Unknown Source)
at org.vcs.bazaar.eclipse.core.inventory.InventoryUpdater.resourceToUpdate(Unknown Source)
at org.vcs.bazaar.eclipse.core.inventory.InventoryCacheManager.basicGetInventory(Unknown Source)
at org.vcs.bazaar.eclipse.core.inventory.InventoryCacheManager.isInInventory(Unknown Source)
at org.vcs.bazaar.eclipse.core.inventory.InventoryCacheManager.isInInventory(Unknown Source)
at org.vcs.bazaar.eclipse.internal.core.model.local.BzrLocalResource.isManaged(Unknown Source)
at org.vcs.bazaar.eclipse.ui.decorator.BazaarLightweightDecorator.decorateByType(Unknown Source)
at org.vcs.bazaar.eclipse.ui.decorator.BazaarLightweightDecorator.decorate(Unknown Source)
at org.vcs.bazaar.eclipse.ui.decorator.BazaarLightweightDecorator.decorate(Unknown Source)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:263)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 417928] [NEW] bzr xmlrpc calls install_bzr_command_hooks on object without that attribute

You need a newer bzr I think.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 417928] [NEW] bzr xmlrpc calls install_bzr_command_hooks on object without that attribute

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Trevor Glen wrote:
> Public bug reported:
>
>>From within eclipse I got this error:
>
> "org.vcs.bazaar.client.core.BazaarClientException$BazaarUncheckedException:
> bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute
> 'install_bzr_command_hooks'
>
> Traceback (most recent call last):
> File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
> return run_bzr(argv)
> File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
> ret = run(*run_argv)
> File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
> return self.run(**all_cmd_args)
> File "/opt/local/lib/python2.5/site-packages/bzrlib/commands.py", line 853, in ignore_pipe
> result = func(*args, **kwargs)
> File "/Users/tg/.bazaar/plugins/xmloutput/__init__.py", line 417, in run
> self.server.serve_forever()
> File "/Users/tg/.bazaar/plugins/xmloutput/service.py", line 86, in serve_forever
> if getattr(commands, 'install_bzr_command_hooks'):
> File "/opt/local/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 109, in __getattribute__
> return getattr(obj, attr)
> AttributeError: 'module' object has no attribute 'install_bzr_command_hooks'
>
> bzr 1.9 on python 2.5.2 (darwin)
> arguments: ['/opt/local/bin/bzr', 'start-xmlrpc']
> encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
> plugins:
>

^- It seems to be calling getattr() on something that it is
LazyImporting, and the two don't play well together.

I would guess xmloutput could just directly import the module, as the
lazy import isn't buying it anything if it is accessing a member right away.

Not to mention that 'commands' is a fairly core module, which is
unlikely to ever not be imported.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqTEPAACgkQJdeBCYSNAAMQbQCfZEwBbwxTi1uH65qHxf9blYaN
lIIAnipyeFYFnfOJBqsacYneklpvPEKq
=SSM5
-----END PGP SIGNATURE-----

Revision history for this message
Trevor Glen (tsg) wrote :

Well, I've just updated to 1.17 and the problem has gone away. I guess there is no point supporting earlier versions when people can easily upgrade.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 417928] Re: bzr xmlrpc calls install_bzr_command_hooks on object without that attribute

On Mon, 2009-08-24 at 23:58 +0000, Trevor Glen wrote:
> Well, I've just updated to 1.17 and the problem has gone away. I guess
> there is no point supporting earlier versions when people can easily
> upgrade.

I'm glad the problem has gone for you.

 status invalid

We do make some effort to support earlier versions in terms of bug fixes
etc - but over the last year (and 1.9 is ~10 months old) we've completed
a major overhaul of much of the code base in our performance drive - and
plugins (of which xmlrpc is one) often depend on these newer features to
work well.

Cheers,
Rob

Changed in bzr:
status: New → Invalid
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Mon, 2009-08-24 at 23:58 +0000, Trevor Glen wrote:
>> Well, I've just updated to 1.17 and the problem has gone away. I guess
>> there is no point supporting earlier versions when people can easily
>> upgrade.
>
> I'm glad the problem has gone for you.
>
> status invalid
>
> We do make some effort to support earlier versions in terms of bug fixes
> etc - but over the last year (and 1.9 is ~10 months old) we've completed
> a major overhaul of much of the code base in our performance drive - and
> plugins (of which xmlrpc is one) often depend on these newer features to
> work well.
>
> Cheers,
> Rob
>
>
> ** Changed in: bzr
> Status: New => Invalid
>

Given that xmloutput is trying to be backwards compatible by using
getattr() I think it makes sense for them to *actually* be backwards
compatible.

 affects bzr-xmloutput
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqT43YACgkQJdeBCYSNAAMH/wCghKkROSyoiBWLEUume7jiMul9
XUMAnA3Vfya/C1FOxwm1+uOav2WjMOpV
=bSgf
-----END PGP SIGNATURE-----

Changed in bzr-xmloutput:
status: New → Confirmed
importance: Undecided → High
importance: High → Medium
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

Marking this as won't fix, as it's for a really old bzr version.

Please feel free to re-open if you really need this fixed.

Changed in bzr-xmloutput:
status: Confirmed → Won't Fix
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.