ElementsOfDataScience
ElementsOfDataScience copied to clipboard
04_loops : UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 619: character maps to <undefined>
The encoding on my windows computer is 'cp1252'.
When I execute the following cell of the 04_loops notebook:
fp = open('2600-0.txt') count = 0 for line in fp: count += 1
I get the following error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 619: character maps to <undefined>
I executed the notebook on local and not on colab
The issue is solved with encoding='utf8'
Will fix. Thanks!