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
Hi, im a using Windows 10 with Powershell and python3.9 and I have trouble with file encoding.
When saving/printing the app uses the 'utf-8-sig' encoding thus includes 2 bytes to specify the format (UTF-8 BOM).
But when reading utf-8 is assumed thus the parser fails.
Example with the README example :
But this is more like a workaround and dont fix the root issue.
The problem appear every time the app tries to read a file it itself wrote, for example when using the --partial argument, I did not find a workaround for this one.
I tried to launch the app with WSL Debian for comparison but the pip installation fails for reasons I am still investigating.
The text was updated successfully, but these errors were encountered:
Could try running python with -X to force utf8. e.g. python3.9.exe -X belt_balancer.py --fast --all networks/4x4 10 4 | python3.9.exe -X render.py.
If that fixes it, then I think you can do the same thing by pasting sys.stdin.reconfigure(encoding='utf-8'); sys.stdout.reconfigure(encoding='utf-8') at the top of every file?
Hi, im a using Windows 10 with Powershell and python3.9 and I have trouble with file encoding.
When saving/printing the app uses the 'utf-8-sig' encoding thus includes 2 bytes to specify the format (UTF-8 BOM).
But when reading utf-8 is assumed thus the parser fails.
Example with the README example :
python3.9.exe belt_balancer.py --fast --all networks/4x4 10 4 | python3.9.exe render.py
output :
I can make it work by replacing line 547
with
(fix found here : https://www.howtosolutions.net/2019/04/python-fixing-unexpected-utf-8-bom-error-when-loading-json-data/)
But this is more like a workaround and dont fix the root issue.
The problem appear every time the app tries to read a file it itself wrote, for example when using the --partial argument, I did not find a workaround for this one.
I tried to launch the app with WSL Debian for comparison but the pip installation fails for reasons I am still investigating.
The text was updated successfully, but these errors were encountered: