title: Why I'm getting "UnicodeEncodeError: charmap' codec can't encode characters in position 24-25: character maps to <undefined>?
body: <p>When I ran the Doctests with Coverage in PyCharm, I got the following error:</p>
  <pre><code>Testing started at 12:25 AM ...
  Traceback (most recent call last):
    File &quot;C:\Program Files\JetBrains\PyCharm 2021.3.1\plugins\python\helpers\coverage_runner\run_coverage.py&quot;, line 34, in &lt;module&gt;
      a_file.write(os.getcwd()+&quot;\n&quot;)
    File &quot;C:\Users\kent8\anaconda3\envs\MyDjangoEnv\lib\encodings\cp1252.py&quot;, line 19, in encode
      return codecs.charmap_encode(input,self.errors,encoding_table)[0]
  UnicodeEncodeError: 'charmap' codec can't encode characters in position 24-25: character maps to &lt;undefined&gt;
  </code></pre>
  <p>I'm using python 3.10.1 and UTF-8 in vs code. How to solve this?</p>