mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fixed UnicodeEncodeError: 'charmap' codec can't encode character
'\u2068' in position 2724: character maps to <undefined> for pylib/tests/test_stats.py
This commit is contained in:
parent
dfa10f5a1c
commit
9dd54c421b
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
# coding: utf-8
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: UTF-8 -*-
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -34,6 +35,6 @@ def test_graphs():
|
||||||
d = aopen(os.path.join(dir, "test.anki2"))
|
d = aopen(os.path.join(dir, "test.anki2"))
|
||||||
g = d.stats()
|
g = d.stats()
|
||||||
rep = g.report()
|
rep = g.report()
|
||||||
with open(os.path.join(dir, "test.html"), "w") as f:
|
with open(os.path.join(dir, "test.html"), "w", encoding="UTF-8") as f:
|
||||||
f.write(rep)
|
f.write(rep)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue