I cant use python function a lot of errors keep appearing

I cant use the python function a lot of errors keep appearing on debug panel
deploying is successful but when I inject or run it keep showing 4 error on debug
these are the 4 errors

**Traceback (most recent call last):**
**  File "<string>", line 67, in <module>**

  **File "C:\Python310\lib\json\__init__.py", line 341, in loads**

  **s = s.decode(detect_encoding(s), 'surrogatepass')**
**  File "C:\Python310\lib\encodings\utf_32_le.py", line 11, in decode**
**    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)**

**"Python Function process exited with code 1"**

so should I do ? :pensive:

Welcome to the forum @Mahmoud19

I know others have had problems with the python function node. I advise against using it. Instead you can either implement the code in javascript or use an exec node to run a python script.

1 Like

the problem is that I have computer vision with plc project so I should use python for computer vision, visual script cant be used for computer vision

So yes use python script to do the vision work and call it from an exec node if you want the results in node-red

oh i get it now, thank u soooo mucccchhhhh

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