LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW with LabPython

Hi,
 
I am trying to use python scripts in LabVIEW.I have used the LabPython to execute the python script in LabVIEW.
I hereby attached the sample code in LabVIEW and python which am i trying to execute.When i run the Main.vi for the first time
it executed properly and gave me the result but when i try to run it once again i am getting the error like this
"Error 1050 occurred at PYTHON Execute
Script__ogtk.vi->Main.vi:<type 'exceptions.TypeError'>, 'NoneType'
object is not callable"
 
can anybody tell me what might be the reason for this??
I will not get this error if i reopen the labview and execute the main.vi once again.
 
Regards
Meenatchi
Download All
0 Kudos
Message 1 of 2
(2,912 Views)
Hi Meenatchi,
 
I'm not extremely familiar with Python but I will try to work through this with you. Everything in the VI appears to be correctly coded. The Code you submitted seems straight forward and I don't see any issues that stand out. The error you reported claims an exception has occured and since you have closed the session in LabVIEW, I believe the exceptio might be occuring in the methods you call in the python code.
 
Can you try removing any of the code to find out if it is a specific method ro property that you call? Also in python can you initialize variables as new or delete them from memory? If you can, I would try one of those. The fact that this error only occurs the second time this is run, leads me to believe that something is created during the first execution that disrupts the second execution.
 
Let me know if you see any changes.
Sappster
0 Kudos
Message 2 of 2
(2,857 Views)