У меня есть проблема с методом «decode» в python 3.3.4. Это мой код:Объект 'str' не имеет атрибута 'decode' в Python3
for lines in open('file','r'):
decodedLine = lines.decode('ISO-8859-1')
line = decodedLine.split('\t')
Но я не могу расшифровать строку для этой задачи:
AttributeError: 'str' object has no attribute 'decode'
У вас есть какие-нибудь идеи? Спасибо
Да, строки в Python 3.x больше не имеют ' decode' - посмотрите https://docs.python.org/3/howto/unicode.html – jonrsharpe