404background / node-red-contrib-python-venv

Node for python virtual environment
https://flows.nodered.org/node/@background404/node-red-contrib-python-venv
MIT License
10 stars 4 forks source link

UnicodeDecodeError: 'cp932' codec can't decode #26

Closed 404background closed 1 month ago

404background commented 2 months ago

The error occurred when the venv node contained Japanese characters. Even if Japanese was included in the comment, the error still occurred.

Since the program in the venv node is saved once to a file and executed, I am thinking that the encoding may have failed at that time.

スクリーンショット 2024-09-05 110219 スクリーンショット 2024-09-05 110126 スクリーンショット 2024-09-05 110114

I will look into the cause in detail. Currently, the error did not occur unless Japanese was included.

Here is the flow.

[{"id":"f2a9af42ec5c74f9","type":"inject","z":"3bccaf6e46d3dbf5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":880,"y":280,"wires":[["903fa2a9e8ef0785"]]},{"id":"f8accc0a64836ab4","type":"debug","z":"3bccaf6e46d3dbf5","name":"debug 87","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1180,"y":280,"wires":[]},{"id":"903fa2a9e8ef0785","type":"venv","z":"3bccaf6e46d3dbf5","venvconfig":"4657b6fbdbaf6f7e","name":"","code":"# あ","continuous":false,"x":1030,"y":280,"wires":[["f8accc0a64836ab4"]]},{"id":"4657b6fbdbaf6f7e","type":"venv-config","venvname":"pyenv","version":"default"}]