Solver: CommandLine: Try fix Windows encoding crash.

setup.py
Pierre-Antoine Rouby 2024-04-24 09:51:58 +02:00
parent ee6b2a94eb
commit 441a064d84
1 changed files with 4 additions and 2 deletions

View File

@ -167,8 +167,10 @@ class CommandLineSolver(AbstractSolver):
repertory, "pamhyr-study-description.txt"
)
with open(path, "w+") as f:
txt = study.description
with open(path, "w+", encoding='utf-8') as f:
txt = study.description\
.encode()\
.decode('utf-8', 'replace')
f.write(txt)
#######