When reading in a file and getting errors such as example:
'utf-8' codec can't decode byte 0xa3 in position 2897: invalid start byte
Add errors='ignore' as per the following example:
with open(fname,"r", errors='ignore') as fo:
Heisenberg - Digital Alchemist, Software Architect, Automation Specialist and Mechanical Engineer.
When reading in a file and getting errors such as example:
'utf-8' codec can't decode byte 0xa3 in position 2897: invalid start byte
Add errors='ignore' as per the following example:
with open(fname,"r", errors='ignore') as fo:
No comments:
Post a Comment
Note: only a member of this blog may post a comment.