Closed umarhunter closed 1 year ago
Yes, that argument is needed on systems where utf-8
is not the default encoding. In the third printing of the book, I added that argument in for all occurrences of read_text()
in Chapter 16. Thank you for bringing this up.
In chapter 16 the book used path.read_text() (in 'eq_world_map.py'), when the read_text function now requires a parameter to be passed (encoding=None). In this case, it should be encoding='utf-8' (on my environment). If you don't pass an encoding type, you get this error message:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 32096: character maps to <undefined>