'function' object has no attribute 'decode' in safe_unicode on MacPorts

Bug #741329 reported by expo on 2011-03-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Undecided
Unassigned

Bug Description

I just installed the latest BaZaar from MacPorts and I got this traceback when I did a bzr rebase:

bzr: ERROR: exceptions.AttributeError: 'function' object has no attribute 'decode'

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/commands.py", line 926, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/commands.py", line 1126, in run_bzr
    ret = run(*run_argv)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/commands.py", line 691, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/commands.py", line 713, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/commands.py", line 1141, in ignore_pipe
    result = func(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/rewrite/commands.py", line 119, in run
    upstream = Branch.open_containing(upstream_location)[0]
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/branch.py", line 199, in open_containing
    return control.open_branch(), relpath
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/remote.py", line 253, in open_branch
    ignore_fallbacks=ignore_fallbacks, unsupported=unsupported)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/remote.py", line 264, in _open_branch
    repos = self.find_repository()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/remote.py", line 163, in find_repository
    return SvnRepository(self, transport, self.branch_path)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/repository.py", line 382, in __init__
    self.get_config().add_location(self.base)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/config.py", line 300, in add_location
    locations = self.get_locations()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/config.py", line 290, in get_locations
    val = self._get_user_option("locations", use_global=False)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/config.py", line 169, in _get_user_option
    value = source()._get_user_option(option_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/config.py", line 146, in _get_uuid_config
    self._uuid_config = SubversionUUIDConfig(self.uuid)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn/config.py", line 85, in __init__
    super(SubversionUUIDConfig, self).__init__(name_generator)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/config.py", line 655, in __init__
    self.dir = osutils.dirname(osutils.safe_unicode(self.file_name))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/osutils.py", line 1262, in safe_unicode
    return unicode_or_utf8_string.decode('utf8')
AttributeError: 'function' object has no attribute 'decode'

bzr 2.3.1 on python 2.7.1 (Darwin-10.7.0-i386-64bit)
arguments: ['/opt/local/bin/bzr', 'rebase']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_GB.UTF-8'
plugins:
  bash_completion /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/bash_completion [2.3.1]
  launchpad /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/launchpad [2.3.1]
  netrc_credential_store /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/netrc_credential_store [2.3.1]
  news_merge /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/news_merge [2.3.1]
  rewrite /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/rewrite [0.6.2]
  svn /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/bzrlib/plugins/svn [1.0.4]

*** 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.

I think it's something wrong inside the macPorts repository because if I use the Bazaar binaries from the official site works well

Martin Pool (mbp) wrote :

I'm guessing this may be a bzr-svn bug, or an inconsistency between bzr-svn and bzr itself. If you update bzr-svn it might go away.

summary: - Traceback with Bazaar from latest MacPorts
+ 'function' object has no attribute 'decode' in safe_unicode on MacPorts
affects: bzr → bzr-svn
Martin Pool (mbp) wrote :

Please see if you can reproduce this with bzr-svn 1.1.0.

Changed in bzr-svn:
status: New → Incomplete
Martin Packman (gz) wrote :

From the exiting bug, this will apparently be fixed in the next bzr-svn release, though it's not clear exactly what the problem is or which revision fixes it from the bug entry.

arthur richards (awjrichards) wrote :

This seems to still persist with the version of bzr-svn available in macports ( 1.0.4_1), which I believe is incompatible with the current version of bzr in macports (2.3.1). I rolled bzr back to what I had previously (2.2.3) as well as my version of bzr-svn (to 1.0.4_0) and that seemed to resolve the issue till bzr-svn 1.1.0 is stable/in macports.

Jelmer Vernooij (jelmer) wrote :

1.0.4 does not have this fix - the fix is currently just committed in trunk and will be in 1.1.0.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers