LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

python node error 1671

Solved!
Go to solution

When I run a vi file that imports python using python node, the following error occurs.

Python returned the following error:<class'SystemError'>D:\a\1\s\Objects\listobject.c:222:bad argument to internal function.

When I run python files alone, there's no problem. And I have verified that labview is compatible with python through simple examples.

May I ask why this kind of problem occurs? How to solve it?

0 Kudos
Message 1 of 4
(898 Views)

@hallo77 wrote:

When I run a vi file that imports python using python node, the following error occurs.

Python returned the following error:<class'SystemError'>D:\a\1\s\Objects\listobject.c:222:bad argument to internal function.

When I run python files alone, there's no problem. And I have verified that labview is compatible with python through simple examples.

May I ask why this kind of problem occurs? How to solve it?


Can you post the LabVIEW code that is resulting in this error?

 

 

 

 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 4
(848 Views)

Hello, thank you very much for your reply. I'm sorry that I don't have any pictures at present, so I can't provide them for the time being. But the labview code is also very simple. The python node simply has a one-dimensional array attached to the return side to display data of type int32. The return type end is connected to an array of one-dimensional constants of data type int32. The other I/O terminals are not connected. I used lists in python programs and eventually converted the list to an array and returned the output. I don't know if it matters.

0 Kudos
Message 3 of 4
(837 Views)
Solution
Accepted by topic author hallo77

Thank you.I've solved the problem. When using Labview's python node, the python program automatically converts a list to an array if it returns it, without any extra processing in my python code. After I removed the list to array code, the code in labview was displayed properly.

0 Kudos
Message 4 of 4
(799 Views)