cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Python in LabView: Errors 1761 or 1671

SOLVED
DrPiti
Member
Solved!

Issue with Python in LabView: Errors 1761 or 1671

Message contains an image

Hi everybody,

 

I am very new to LabVIEW and I am experiencing a very strange problem: Python is not working with my LabVIEW installation, not even the simplest example case. I would really appreciate any help or advice, cause I am messing around with this issue for hours now.

Some information about the system:

 

I use a 64bit LabVIEW Version 2024 Q1 together with a python 3.9 64bit installation (by Microsoft Appstore). I chose this version, to make sure, that I do not run into a version conflict:

DrPiti_0-1712145368869.png     DrPiti_1-1712145400532.png

 

Path variables are setup correctly (installation is under C:\users\peter.schmidt\AppData\Microsoft...). From above you can also see, that I can access python via cmd:

DrPiti_2-1712145456010.png

echo %Path%:

DrPiti_3-1712145621429.png

 

From my point of view, the installation should be correct. I first tried the examples coming with LabVIEW, none of these worked. Then I created the most simple example ever:

My VI looks as follows:

DrPiti_4-1712145873501.png

 

It just consists of a Python Session On -> Python Node -> Python Session Off. The python code in MyTestFunc.py is:

DrPiti_5-1712145928406.png

So this simple Test() Function does not take any arguments and just resturns a float constant 2.2. Running this test VI gives me Error 1761:

DrPiti_6-1712146023036.png

 

It basically seems that LabVIEW does not find the correct python path. However, if I pipe-in the python path, by connecting the string constant (e.g. C:\Users\peter.schmidt\AppData\Local\Microsoft\WindowsApps\python.exe) with the Open Python Session INPUT for python Path:

DrPiti_7-1712146184693.png

I will receive Error 1671:

DrPiti_8-1712146255557.png

What am I doing wrong? At first I thought it is because I have zero experience in LabVIEW, but even the LabVIEW-Python Examples do not work. Does any know what to check for as a next step?

Is it possible, that the dot in the user name "peter.schmidt" causes an issue?

 

Many Thanky!

BR,

Peter

 

6 REPLIES 6
dkfire
Active Participant

Re: Issue with Python in LabView: Errors 1761 or 1671

there is an error in you python version string, it should be 3.9 and NOT 3.09

DrPiti
Member

Re: Issue with Python in LabView: Errors 1761 or 1671

Message contains an image

Many thanks for the reply! Shame on me, you are right! Unfortunately, that does not fully resolve the issue. With the correct version string, 3.9, I still run into errors:

If I keep the python Path connected, I will receive Error 1761 now:

 

DrPiti_1-1712148845751.png

 

 

If I disconnect, e.g. let LabVIEW choose the python path by system path, then I now receive a new Error 1672:

DrPiti_0-1712148776053.png

 

dkfire
Active Participant

Re: Issue with Python in LabView: Errors 1761 or 1671

And you have tried to run your py function in python ?

DrPiti
Member

Re: Issue with Python in LabView: Errors 1761 or 1671

Message contains an image

Yes, of course:

DrPiti_0-1712153983136.png

 

I mean, it doesn't do something impressive. I added a print line and called the function (without a call actually nothing will happen) just to see some output and it works fine.

Andrey_Dmitriev
Trusted Enthusiast
Solution

Re: Issue with Python in LabView: Errors 1761 or 1671

Message contains a hyperlink Message contains an image

For me it works in this combination and take a note I have default python in PATH 3.11.6, but 3.9.13 also installed and it works:

py_snippet.png

and also if I'll disconnect full path to python, still working (kind of magic):

py_snippet2.png

only with wrong version raised error 1761:

py_snippet3.png

But I never ever used installation from Microsoft Store. Try to download and install python "normally" from original website.

DrPiti
Member

Re: Issue with Python in LabView: Errors 1761 or 1671

@Andrey_Dmitriev you are a genius!

 

After completely removing the MS Store Installation and installing it from the link you shared it works properly! I thank you so much!
Crap nuggets, I never considered this a possibility - my bad! 

 

It seems that MS Store installation messes up to set PATH Variables correctly. 

 

Thank you so much!
BR,

Peter