Python3 Function Error

I am using Python3 function and facing this following errors,

  1. File "C:\Python39\lib\json_init_.py", line 341, in loads.
  2. s = s.decode(detect_encoding(s), 'surrogatepass') File "C:\Python39\lib\encodings\utf_32_le.py", line 11, in decode.
  3. return codecs.utf_32_le_decode(input, errors, True)UnicodeDecodeError: 'utf-32-le' codec can't decode bytes in position 16-19: code point not in range(0x110000)

Please Help.

What do you mean by using Python3 function?

Are you using a python node (which one) or calling python in an exec node, or what?

python3 function node.

I presume you mean node-red-contrib-python3-function.
If you look at its page in the flows site you will see it has not been updated in 4 years, and there are unaddressed issues on its github page.
There have been issues with both python nodes and many have switched to calling the python script in an exec node instead, or for long running scripts using the daemon node, or running the script completely outside node-red and communicating with it via MQTT or other method.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.