LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python error 1671 after previously working

Solved!
Go to solution

Hi people,

I had a working executable yesterday, on 2 PCs, but today it won't work on either! 

I made a simple new executable which just opens a python session then closes it. An error indicator shows error 1671 coming out of the open session.

This works fine on my dev PC. 

All 3 PCs are running identical python 2.6 (not my choice), all with the correct PATH environment variable. I can run python manually from any location. I uninstalled and reinstalled using the same default settings as always with no different result. 

So why does it not work?

How come it's stopped on 2 PCs? 

I half suspect corporate/policy changes but it does work on dev PC in both vi and executable so that can't be it. 

Any suggestions of the problem or solution?

Thanks in advance... 

 

Oh, LabVIEW 2020 32bit, Windows 10

 

0 Kudos
Message 1 of 7
(427 Views)

OK, small update - I've just seen in the detailed help window that "This function supports Python of version 2.7 and 3.6 only. Although unsupported versions might work with the LabVIEW Python functions, NI recommends using supported versions of Python only." and like I said, I'm using Python 2.6.

I guess I'm on thin ice here but any potential solutions would be great.

0 Kudos
Message 2 of 7
(392 Views)

Did you happen to change the bitness? Make sure all your PCs are running the same python/labview bitness

0 Kudos
Message 3 of 7
(371 Views)

Nope, I only had a single 32bit installer.

As a new experiment today, I additionally installed 32bit python 3.6.

I made my 'open session' version a control, made it executable and ran it on the broken PC. Pointing to python 3.6 works with no errors, swapping back to 2.6 always returns the error.

So it seems to be proven that being able to run 2.6 previously just meant I was lucky, for a while. 

0 Kudos
Message 4 of 7
(355 Views)

Ok, so I did one more test now.  After installing 32bit Python 2.7 which LabVIEW 2020 claims to support, I find error 1671 when I open a Python 2.7 session.

So bitness matches, path is good, claimed compatibility seems to be wrong.

 

Any suggestions?

0 Kudos
Message 5 of 7
(204 Views)

You could try wiring the path on open session directly to the python exe

Or just try to uninstall all other versions of python, and maybe even reinstall 2.7 with set PATH selected during install to reset the PATH

0 Kudos
Message 6 of 7
(187 Views)
Solution
Accepted by topic author Mr_Eee

UnholyPenguin - I just tried your first suggestion and couldn't get that to work at all, resulting in error 1664.

Anyway, I worked out the total solution to my problem:-  I uninstalled then reinstalled LabVIEW 2020 runtime engine.  Now I can open Pythons 2.6, 2.7 and 3.8 at leisure with all version installed.

 

It still frustrates me that it worked fine one day then not the 2nd!

0 Kudos
Message 7 of 7
(178 Views)