Python :- UnicodeDecodeError: 'charmap' codec can't decode byte


encounter this issue sometime ago and the reason this is happening is because open() file method was called without passing in encoding type like utf8, etc. If you open your file using the code below, the error should go away.



with open(fname, encoding='utf8') as fp:

Comments

Popular posts from this blog

PySpark - Working with JDBC Sqlite database