AttributeError _callable_names in get_hook_name running bzr hooks

Bug #389648 reported by Mohamed Diarra
66
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Vincent Ladeuil
2.0
Confirmed
Medium
Unassigned
Bazaar Subversion Plugin
Invalid
Undecided
Unassigned

Bug Description

I get the following when just running the following command: bzr hooks

$ bzr hooks
BranchHooks:
  open:
    <no hooks installed>
  post_change_branch_tip:
    <no hooks installed>
  post_commit:
    <no hooks installed>
  post_pull:
    <no hooks installed>
  post_push:
    <no hooks installed>
  post_uncommit:
    Remember uncomitted message for qcommit
  pre_change_branch_tip:
    <no hooks installed>
  pre_commit:
    <no hooks installed>
  set_rh:
    <no hooks installed>
  transform_fallback_location:
    <no hooks installed>
BzrDirHooks:
  pre_open:
    <no hooks installed>
CommandHooks:
  extend_command:
    <no hooks installed>
LockHooks:
  lock_acquired:
    <no hooks installed>
  lock_released:
    <no hooks installed>
MessageEditorHooks:
  commit_message_template:
    <no hooks installed>
MutableTreeHooks:
  start_commit:
    <no hooks installed>
SmartClientHooks:
  call:
    <no hooks installed>
SmartServerHooks:
  server_started:
    <no hooks installed>
  server_stopped:
    <no hooks installed>
RioVersionInfoBuilderHooks:
  revision:
bzr: ERROR: exceptions.AttributeError: 'RioVersionInfoBuilderHooks' object has n
o attribute '_callable_names'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 727, in exception_to_return_code
  File "bzrlib\commands.pyo", line 922, in run_bzr
  File "bzrlib\commands.pyo", line 559, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 5462, in run
  File "bzrlib\hooks.pyo", line 142, in get_hook_name
AttributeError: 'RioVersionInfoBuilderHooks' object has no attribute '_callable_
names'

bzr 1.14.1 on python 2.5.2 (win32)
arguments: ['c:\\Program Files\\Bazaar\\bzr.exe', 'hooks']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.14]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store
[unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.9]
  svn C:\Program Files\Bazaar\plugins\svn [0.5.4]
*** 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.

Thanks

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 389648] [NEW] internal error on bzr hooks

On Fri, 2009-06-19 at 19:37 +0000, Mohamed Diarra wrote:
> Public bug reported:
>
> I get the following when just running the following command: bzr hooks

> RioVersionInfoBuilderHooks:
> revision:
> bzr: ERROR: exceptions.AttributeError: 'RioVersionInfoBuilderHooks' object has n
> o attribute '_callable_names'

Wow, I didn't even know we had this command :).

Anyhow, this works for me in 1.16; it could be a plugin (please try bzr
--no-plugins hooks), or it could have been fixed by the hooks rework a
few months ago (please try 1.16).

Thanks
Rob

 status incomplete

Changed in bzr:
status: New → Incomplete
Revision history for this message
Mohamed Diarra (mohdiarra) wrote : Re: internal error on bzr hooks

The bzr --no-plugins hooks works fine and I don't get that error anymore.
I tried bzr 1.16 and I still that exception.
Maybe it's because I'm using python 2.5 ???? I don't get this error when running the command on my Ubuntu box with python 2.6.2.
The --no-plugins does the trick though.

Thanks,
-- Mohamed

Revision history for this message
Wouter van Heyst (larstiq) wrote :

This happens for me with python 2.5 on Lenny and bzr.dev when the svn plugin is used. The root cause is some classes dervied from Hooks not calling Hooks.__init__.

Changed in bzr:
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
dmuir (dmuir) wrote :

I get a similar error when running `bzr hooks` with bzr 2.0.
Mine dies here:

InfoHooks:
  repository:
bzr: ERROR: exceptions.AttributeError: 'InfoHooks' object has no attribute '_callable_names'

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 389648] Re: internal error on bzr hooks

dmuir, can you please run
'bzr plugins'

Thanks,
Rob

Revision history for this message
Joke de Buhr (joke) wrote : Re: internal error on bzr hooks

Probably same or similar problem here:
  bzr: ERROR: exceptions.AttributeError: 'InfoHooks' object has no attribute '_callable_names'

The bzr-svn plugin seems to cause the problem. After purging it via aptitude the error disappeared.

Karmic with bazaar ppa beta:

bzr plugins -v:
svn 1.0.0
    Support for Subversion branches
    /usr/lib/python2.6/dist-packages/bzrlib/plugins/svn

bzr version -v
Bazaar (bzr) 2.0.0

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

I've got the same problem with bzr.exe 2.0.1:

BranchHooks:
  open:
    <no hooks installed>
  post_change_branch_tip:
    <no hooks installed>
  post_commit:
    <no hooks installed>
  post_pull:
    <no hooks installed>
  post_push:
    <no hooks installed>
  post_uncommit:
    Remember uncomitted revision data for qcommit
  pre_change_branch_tip:
    <no hooks installed>
  pre_commit:
    <no hooks installed>
  set_rh:
    <no hooks installed>
  transform_fallback_location:
    <no hooks installed>
BzrDirHooks:
  pre_open:
    <no hooks installed>
CommandHooks:
  extend_command:
    <no hooks installed>
  get_command:
    bzr commands
    bzr plugin commands
    bzr external command lookup
  get_missing_command:
    bzr plugin-provider-db check
  list_commands:
    bzr commands
InfoHooks:
  repository:
bzr: ERROR: exceptions.AttributeError: 'InfoHooks' object has no attribute '_callable_names'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 5593, in run
  File "bzrlib\hooks.pyo", line 147, in get_hook_name
AttributeError: 'InfoHooks' object has no attribute '_callable_names'

bzr 2.0.1 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.EXE', 'hooks']
encoding: 'cp1251', fsenc: 'mbcs', lang: 'ru'
plugins:
  acad C:\work\Bazaar\plugins\acad [0.8.0]
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\work\Bazaar\plugins\explorer [0.9.0]
  fastimport C:\work\Bazaar\plugins\fastimport [0.8.0dev]
  format1 C:\work\Bazaar\plugins\format1 [unknown]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.1]
  qbzr C:\work\Bazaar\plugins\qbzr [0.14.5]
  rebase C:\work\Bazaar\plugins\rebase [0.5.4]
  repoalias C:\work\Bazaar\plugins\repoalias [unknown]
  scmproj C:\work\Bazaar\plugins\scmproj [0.4.6dev]
  stats C:\work\Bazaar\plugins\stats [unknown]
  svn C:\work\Bazaar\plugins\svn [1.0.2dev]
  x_bit C:\work\Bazaar\plugins\x_bit [1.0.0]

*** 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
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Running `bzr --no-plugins hooks` is OK.

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

Wouter said this bug triggered by bzr-svn plugin.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

bzr-svn just happens to trigger this because it happens to register a info hook, that doesn't necessarily make it a bzr-svn bug.

InfoHooks.__init__ seems to lack a call to the constructor of its base class (Hooks).

Changed in bzr-svn:
status: New → Invalid
Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
status: In Progress → Fix Committed
milestone: none → 2.1.0b3
Changed in bzr:
status: Fix Committed → Fix Released
Martin Pool (mbp)
summary: - internal error on bzr hooks
+ AttributeError _callable_names in get_hook_name running bzr hooks
Revision history for this message
Chris Sommers (chris-ozzresearch) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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