LabVIEW Eror Code 1671 (Related to Python Script), How can I handle it?

87 Views Asked by At

I am trying to call a python function to LabVIEW using some nodes. However, I am getting an error (code:1671) related to python. Could you please help me to solve this error? Thank you. I am using LabVIEW 2023 Q3 and Python 3.6.0 both 64 bit.

  1. Here is the error mesage from LabVIEW:

Python Node in labviewdeneme.vi<APPEND> Module Path: "C:\Users\GörkEmir\Desktop\pythoncode\deneme3.py" Function Name: getClassData Python returned the following error: <class 'UnicodeDecodeError'> 'utf-8' codec can't decode byte 0xf6 in position 11: invalid start byte

  1. Here is the Python code:
#define class
class myClass(object):
    def __init__(self, parameter):
        self.__Parameter = parameter
    def GetValue(self):
        return self.__Parameter

#define wrapper for LabVIEW Python node        
def getClassData():
    newClassObject = myClass(4882)
    value = newClassObject.GetValue() 
    castedValue = int(value)
    return castedValue

I tried to change python code such as casting or converting string to int and int to string. But they did not work.

0

There are 0 best solutions below