bzr serve shows error TypeError: not all arguments converted during string formatting
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
$ bzr serve
listening on port: 4155
bzr: ERROR: exceptions.
Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
smart_
File "/usr/lib/
hook(
File "/usr/lib/
return "bzr://%s:%d/" % self._sockname
TypeError: not all arguments converted during string formatting
bzr 1.8 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'serve']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'pt_BR.UTF-8'
plugins:
avahi /usr/lib/
bzrtools /usr/lib/
dbus /usr/lib/
gtk /usr/lib/
launchpad /usr/lib/
*** Bazaar has encountered an internal error.
Please report a bug at https:/
including this traceback, and a description of what you
were doing when the error occurred.
Changed in bzr: | |
status: | Confirmed → In Progress |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in bzr: | |
status: | In Progress → Fix Committed |
Changed in bzr: | |
milestone: | none → 2.4b1 |
status: | Fix Committed → Fix Released |
I see the cause. This bug can be provoked with the combination of:
- bzr serve trying to use an IPv6 address (which may happen your system has IPv6 support installed, even if you don't have any working IPv6 interfaces)
- having a server_started hook installed
Specifically, with an IPv6 socket getsockname() returns a 4-element tuple like ('::', 4155, 0, 0), instead of a 2-element one like ('0.0.0.0', 4155). But the get_url() function assumes that it always going to be a 2-element tuple.