[issue14847] AttributeError: NoneType has no attribute 'utf_8_decode'

Daniel Swanson report at bugs.python.org
Sat May 19 15:56:30 CEST 2012


Daniel Swanson <popcorn.tomato.dude at gmail.com> added the comment:

I attempted to reproduce the error. I didn't, all I got was
'str' object has no attribute 'decode'
here is the whole test.

Python 3.2.2 (default, Sep  4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> b''.decode('utf-8')
''
>>> ''.decode('utf-8')
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    ''.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
>>> b'x'.decode('utf-8')
'x'
>>> 

Appearently, this error does not apply to Python 3.2.2.

----------
nosy: +weirdink13

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14847>
_______________________________________


More information about the Python-bugs-list mailing list