Reputation: 3059
I am using a toolkit that enables me to call a python script from LabVIEW using IPC mechanism.
- If you do not know about LabVIEW, it is fine. I do not think it matters much for the relevance of the question - just think it as some other programming language IDE.
- This toolkit is provided by a company Enthought, so I do not have the toolkit source code.
- The toolkit only works with python 2.7.
In LabVIEW.exe. I am using the toolkit API - "New Session" whose function is to launch python.exe as a different process and connect to it via TCP/IP protocol. However, this API errors out with the following message:
ERROR: Uncaught exception in TCP loop. TypeError: cannot make memory view because object does not have the buffer interface.
The API also reports additional error as "couldn't connect to Python. This could mean the connection to Python was closed, the Python process exited, or something went wrong on startup."
I am unable to figure out how to fix this error. Do I need to install/upgrade some python packages ?
In Resource monitor, I see that python.exe is launched and there is a listening port for it with address as IPv4 loopback. The firewall is disabled in the system.
I have searched for it over the web and have tried a few things but none seems to fix this.
An image link for reference.
Upvotes: 0
Views: 203
Reputation: 3059
It seems that the problem was the version of Python I was using - Python 2.7.0 32-bit.
The above described issue went away when I upgraded to Python 2.7.13.
Jonathan March (Enthought) says that "there have been thousands of bug fixes and hundreds of feature improvements in the intervening 7 years, including many networking-related; for up-to-date Python and package builds (including MKL-optimized numpy)". So, that explains it I guess. Thanks !
Upvotes: 1