You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The call to open() to terminate MiniZinc on Windows omits the encoding argument. This triggers an EncodingWarning if warnings are enabled (-W default).
The fix is as follows:
--- a/src/minizinc/instance.py+++ b/src/minizinc/instance.py@@ -675,7 +675,8 @@ class Instance(Model):
# First, terminate the process
if sys.platform == "win32":
with open(
- f"\\\\.\\pipe\\minizinc-{proc.pid}", mode="w"+ f"\\\\.\\pipe\\minizinc-{proc.pid}", mode="w",+ encoding="utf8"
) as named_pipe:
# Trigger MiniZinc termination
named_pipe.write("")
The text was updated successfully, but these errors were encountered:
The call to
open()
to terminate MiniZinc on Windows omits the encoding argument. This triggers an EncodingWarning if warnings are enabled (-W default
).The fix is as follows:
The text was updated successfully, but these errors were encountered: