[Tutor] Python .decode issue
Pierre Dagenais
pierre.dagenais at ncf.ca
Tue Feb 11 00:16:35 CET 2014
On 14-02-08 12:55 AM, james campbell wrote:
> header_bin = header_hex.decode('hex')
> AttributeError: 'str' object has no attribute 'decode'
What I understand is that you are trying to decode 'hex', which is a
string. The interpreter is telling you that strings cannot be decoded.
I do not know header_hex.decode(), but I suspect it's expecting an hex
number, check it out.
PierreD.
More information about the Tutor
mailing list