LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python session fails to open (Windows 7 64bits - LV2018 32bts - Miniconda Python 3.6 32bts)

Hello,

 

I've been trying to start a python session from Labview 2018 32bits. First on my path is a Miniconda3 distribution of python 3.6.0 32bits (I tried also 3.7, and 3.6.7).

However it fails with the following error message:

 

Error 1671 occurred at test_python.vi

Possible reason(s):

LabVIEW: (Hex 0x687) There was an error in executing the specified function.


Python returned the following error: Error creating host process

This is the code that caused the error:
visnippet.png

 

Unfortunatelly that error code (Hex 0x687) is the standard "there was an error in the python code that was executed". This seems to be an issue with a function call by open session in the python36.dll . However I have no idea how to debug that. How would I isolate whether my python DLL is corrupt?

 

Questions (I'm looking for anything that might help me fix this):

 - How could I test the python distribution?

 - What is Labview doing to create a session?

 - Has anyone managed to get any Python>=3.5 to work with Labview2018 32bits (bonus: on a Windows 7, 64bits machine)?

 

The things it does not seem to be:

 - The python executable of this distribution works from the command line (regardless of the location of my cmd). Which suggests it's not a path issue and that the python installation works on the system (well it does because it runs successfully with labview systemexec).

 - This doesn't seem to be an incompatible version bits-wise. Labview has a specific message for that.

Other things that work on the machine:

- Labview 2018 64bits with Python 3.7 64bits (after changes to paths).

Labview 2018 32bits with Python 2.7.

 

If you think you have any idea on a step to take to get more information about the problem or what it could be, I'd be extremely grateful.

 

I'm a reasonably experienced developer in C and C++ but am a Labview newbie and don't know all the ins and out of python. However based on the other questions on this forum no one seems to have "fixed" that specific error without just using a different distribution.

 

 Thanks!

Message 1 of 8
(5,279 Views)

Hey Payto, 

 

Where is the code stored? usually error 1671 is due to the code being saved on a network drive.

Error 1671 Using Python Script Stored on Network Drive in LabVIEW

 

Let me know how it goes, 

Rebecca

0 Kudos
Message 2 of 8
(5,241 Views)

Hi Rebecca, 

 

The code is stored on the C:\ drive, the same as labview and the OS.

 

Thanks,

0 Kudos
Message 3 of 8
(5,238 Views)

I also encountered this problem, LabVIEW 2018_32bits (Windows is 64bits), anaconda_64bits (Python 3.7.1), and I would like to get a response.

0 Kudos
Message 4 of 8
(4,815 Views)

I have the same Problem with LabVIEW 2019 SP1.

Any news about that?

0 Kudos
Message 5 of 8
(4,247 Views)

Anaconda Python may have compatibility issue when it comes to using Python node in LabVIEW, so I'd try using the traditional edition of python.

 

See Integrate Conda Python Environment with LabVIEW

0 Kudos
Message 6 of 8
(4,245 Views)

Hi NIRebecca 

 

Thanks for your answer!

Do you know what exatly the Problem is? I thought that Anaconda is just a Development Environment which coms with a standard Python Version....

0 Kudos
Message 7 of 8
(4,232 Views)

Hey Cardinal1664, 

 

I'm not 100% but I think it's simply that only Traditional Python 2.7 and 3.6 have been verified as compatible. This isn't to say Conda python will never work, more that we can't promise it will always work as it hasn't been tested.

 

"Although unsupported versions might work with the LabVIEW Python functions, NI recommends using supported versions of Python only." Integrate Conda Python Environment with LabVIEW

 

You could try using the System Exec VI to call the Python script from LabVIEW as an alternate approach?

 

 

0 Kudos
Message 8 of 8
(4,212 Views)