Python2.6 hmac.py TypeError: character mapping must return integer, None or unicode"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
James Henstridge | ||
Python |
Invalid
|
Undecided
|
Unassigned | ||
bzr (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I got the following traceback when recently using pqm-submit (version 1.3.0-1 on Jaunty, with python2.6):
jblount@
/usr/lib/
from sha import *
/usr/lib/
from md5 import *
Checking the working tree is clean ...
Checking that the public branch is up to date ...
You need a passphrase to unlock the secret key for
user: "Josh Blount (Personal) <email address hidden>"
1024-bit DSA key, ID 3DB79EBB, created 2008-07-29
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/
tree=tree)
File "/usr/lib/
SMTPConnect
File "/usr/lib/
self._connect()
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
(code, resp) = self.docmd(
File "/usr/lib/
response = user + " " + hmac.HMAC(password, challenge)
File "/usr/lib/
self.
TypeError: character mapping must return integer, None or unicode
bzr 1.12 on python 2.6.1 (linux2)
arguments: ['/usr/bin/bzr', 'pqm-submit', '-m', '[r=statik, r=chipaca, r=facundo] removes video place holder, lightens colors']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
bzrtools /usr/lib/
launchpad /usr/lib/
netrc_
pqm /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: | |
milestone: | none → 1.14rc1 |
status: | Fix Committed → Fix Released |
Changed in bzr (Ubuntu): | |
status: | New → Fix Released |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> bzr: ERROR: exceptions. TypeError: character mapping must return integer, python2. 6/dist- packages/ bzrlib/ commands. py", line 896, in run_bzr_ catch_errors python2. 6/dist- packages/ bzrlib/ commands. py", line 842, in run_bzr python2. 6/dist- packages/ bzrlib/ commands. py", line 542, in run_argv_aliases **all_cmd_ args) python2. 6/dist- packages/ bzrlib/ plugins/ pqm/__init_ _.py", line 110, in run python2. 6/dist- packages/ bzrlib/ plugins/ pqm/pqm_ submit. py", line 215, in submit config) .send_email( message) python2. 6/dist- packages/ bzrlib/ smtp_connection .py", line 152, in send_email python2. 6/dist- packages/ bzrlib/ smtp_connection .py", line 67, in _connect ate() python2. 6/dist- packages/ bzrlib/ smtp_connection .py", line 114, in _authenticate n.login( self._smtp_ username, self._smtp_ password) python2. 6/smtplib. py", line 574, in login encode_ cram_md5( resp, user, password)) python2. 6/smtplib. py", line 538, in encode_cram_md5 .hexdigest( ) python2. 6/hmac. py", line 72, in __init__ update( key.translate( trans_5C) )
> None or unicode
>
> 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/
> tree=tree)
> File "/usr/lib/
> SMTPConnection(
> File "/usr/lib/
> self._connect()
> File "/usr/lib/
> self._authentic
> File "/usr/lib/
> self._connectio
> File "/usr/lib/
> (code, resp) = self.docmd(
> File "/usr/lib/
> response = user + " " + hmac.HMAC(password, challenge)
> File "/usr/lib/
> self.outer.
> TypeError: character mapping must return integer, None or unicode
^- From what I can tell, this is a bug in python's smtplib and how it
handles start_tls.
Certainly at best we are passing whatever plain-text password down into
login(), which is then responsible for the encoding, etc. Which it seems
to be failing to do.
affects python
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org
v628ACgkQJdeBCY SNAANpGQCeLjIeo sDZ/w89FM8n8H3r Yae1 OyvfG/z2OTjaPaL EP
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkm
vhEAoJGsQFLAE1N
=NEMv
-----END PGP SIGNATURE-----