Traceback when fetching in a directory containing a ptyhon package named email

Bug #306857 reported by Vincent Ladeuil
2
Affects Status Importance Assigned to Milestone
bzr email commit hook
New
Undecided
Unassigned

Bug Description

Since revno 39 Draft support for mailing on push/pull, 'bzr branch' in ~/.bazaar/plugins tracebacks:

  bzr branch lp:bzr-xmloutput xmloutput
bzr: ERROR: exceptions.ImportError: The email plugin must be installed as bzrlib.plugins.email not email

Traceback (most recent call last):
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/builtins.py", line 981, in run
    source_branch=br_from)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/bzrdir.py", line 1137, in sprout
    result, revision_id=_mod_revision.NULL_REVISION)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/remote.py", line 1687, in sprout
    self, to_bzrdir, revision_id=revision_id)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/branch.py", line 705, in sprout
    self.copy_content_into(result, revision_id=revision_id)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/branch.py", line 745, in copy_content_into
    self._synchronize_history(destination, revision_id)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/branch.py", line 736, in _synchronize_history
    destination.set_last_revision_info(revno, revision_id)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/branch.py", line 2131, in set_last_revision_info
    self._run_post_change_branch_tip_hooks(old_revno, old_revid)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/branch.py", line 1657, in _run_post_change_branch_tip_hooks
    hook(params)
  File "/home/vila/.bazaar/plugins/email/__init__.py", line 97, in branch_post_change_hook
    _emailer.EmailSender(params.branch, params.new_revid,
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/lazy_import.py", line 106, in __getattribute__
    obj = _replace()
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/lazy_import.py", line 89, in _replace
    obj = factory(self, scope, name)
  File "/net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/lazy_import.py", line 192, in _import
    module = __import__(module_python_path, scope, scope, [member])
  File "/home/vila/.bazaar/plugins/email/emailer.py", line 25, in <module>
    from smtp_connection import SMTPConnection
  File "/home/vila/.bazaar/plugins/email/smtp_connection.py", line 19, in <module>
    from email.Header import Header
  File "/home/vila/.bazaar/plugins/email/__init__.py", line 63, in <module>

ImportError: The email plugin must be installed as bzrlib.plugins.email not email

bzr 1.11dev on python 2.5.2 (linux2)
arguments: ['/home/vila/bin/bzr', 'branch', 'lp:bzr-xmloutput', 'xmloutput']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bookmarks /home/vila/.bazaar/plugins/bookmarks [unknown]
  defaultToUrllib /home/vila/.bazaar/plugins/defaultToUrllib [unknown]
  difftools /home/vila/.bazaar/plugins/difftools [0.91]
  email /home/vila/.bazaar/plugins/email [unknown]
  fastimport /home/vila/.bazaar/plugins/fastimport [unknown]
  fix277537 /home/vila/.bazaar/plugins/fix277537 [unknown]
  gdfo /home/vila/.bazaar/plugins/gdfo [unknown]
  grep /home/vila/.bazaar/plugins/grep [unknown]
  gtk /home/vila/.bazaar/plugins/gtk [0.96.0.dev.1]
  hgrep /home/vila/.bazaar/plugins/hgrep [unknown]
  launchpad /net/bigmamac/Volumes/home/vila/src/bzr/trunk/bzrlib/plugins/launchpad [unknown]
  local_test_server /home/vila/.bazaar/plugins/local_test_server [unknown]
  loom /home/vila/.bazaar/plugins/loom [1.4dev]
  pqm /home/vila/.bazaar/plugins/pqm [1.4dev]
  stats /home/vila/.bazaar/plugins/stats [unknown]
  testprefixes /home/vila/.bazaar/plugins/testprefixes [unknown]
  transportstats /home/vila/.bazaar/plugins/transportstats [unknown]
  upload /home/vila/.bazaar/plugins/upload [0.1.1]
  usertest /home/vila/.bazaar/plugins/usertest [unknown]
  webdav /home/vila/.bazaar/plugins/webdav [1.6]
*** 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.

Relevant part of locations.conf:
[/net/bigmamac/Volumes/home/vila/.bazaar/plugins]
post_commit_to = <email address hidden>
public_branch:policy = appendpath

The above should be enough to reproduce.

Most likely any fetch operation should trigger it (whether mail should be sent or not ).

Revision history for this message
Vincent Ladeuil (vila) wrote :

May be a duplicate of bug #72227 or bug #304891

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.