[python] 'str' object has no attribute 'decode'. Python 3 error?

Use codecs module's open() to read file:

import codecs
with codecs.open(file_name, 'r', encoding='utf-8', errors='ignore') as fdata: