12-20-2020 04:54 PM
Hi,
I have a TCP/IP communication protocol between Python and Labview.
LV sends data to Py and Py returns a confirmation back to LV. The problem is I am receiving a error-375006 when receiving the confirmation on the LV side.
Attached are both Py and LV. The error is regarding the unflatten from json but I really do not know what I am doing wrong.
Any help is appreciated.
Solved! Go to Solution.
12-20-2020 07:28 PM
A few issues:
Your Python code is incomplete, there is no code to send a reply (ie. client.send(bytes(json.dumps(response),'utf8')))
In LV, your cluster constant on the BD has different labels than the one on your FP. Not a problem if you use the right labels to build the JSON reply (the ones hidden in the BD constant), but that is a bit tricky.
When I throw in a reply from Python, the next problem is that the socket is immediately closed which causes the TCP read in LV to error out with Error 66. Not a big deal as I ignore this error many times when I expect it, but you are feeding it into the Unflatten from JSON node so it will not work and instead errors out.
12-20-2020 07:51 PM
Sorry, I think I have sent you the older version.
Here is the latest version.
12-20-2020 08:09 PM
Yup, the error was because I had a different name in the BD!
Thank you so much!