30-Days-of-Python icon indicating copy to clipboard operation
30-Days-of-Python copied to clipboard

UnicodeEncodeError [RESOLVED]; RuntimeError: Event loop is closed [OPEN]

Open bc2014 opened this issue 5 years ago • 0 comments

Upon running the scipt, I got 2 errors:

  1. UnicodeEncodeError: 'charmap' codec can't encode character <some-character> in position <some-position>: character maps to <undefined> SOLUTION: add following parameter to output_file.write_text(...): encoding="utf-8"

  2. RuntimeError: Event loop is closed Did anyone resolve this error?

bc2014 avatar Oct 25 '20 00:10 bc2014