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:


Popular posts from this blog

Solving Sonarqube :- Project was never analyzed. A regular analysis is required before a branch analysis

PySpark - Working with JDBC Sqlite database