01-30-2025 01:56 PM
Hello,
I'm using LabVIEW 2021.
I have a Python function which has two arguments.
startScan(counting_time, file_name)
I'm trying to call this function using the Python Node. I've tried two methods of passing the arguments:
Both of these give me the same error: "<class 'TypeError'> bad argument type for built-in operation". Not sure what this error is about.
The Python code itself is flawless as I have run it on its own.
Thanks in advance for your help!
01-31-2025 01:25 PM
I had a similar error using a Python node, generally it is cause by a data type that can't be type casted to a LabVIEW data type (like a null value). Make sure what you think is a string in Python is really a string (Python is very loose with data type), you can use the str() function in Python before outputting the value (that was the cause of the error in my case).
Ben
01-31-2025 07:11 PM
Thanks. I figured out what was happening in my case. It was a mismatch of number of return values. It's fixed now.