Closed vikramsubramanian closed 2 months ago
Hi.
Loguru uses "utf8"
file encoding by default since 0.6.0
(it used to be locale.getpreferredencoding()
). In your case, I guess you can get back the old behavior by specifying "encoding": "ascii"
while adding the handler here:
Thanks for your answer,
I thought that the encoding always was utf-8 starting with python3, it seems not.
So setting loguru encoding to ascii makes recent version of python fail, and setting encoding to utf-8 makes reading from a file without encoding="utf-8"
fail on python36.
I feel this change will force people to set the proper encoding when reading/writing files.
We have a python project with loguru as dependency (version is not pinned) and one of our CI job running on ubuntu bionic (python 3.6) is failing. It seem that loguru was updated to 0.6.0 and raised the following error: