05-16-2024 04:33 PM
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
Solved! Go to Solution.
05-17-2024 02:17 AM
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.
05-17-2024 08:20 AM
Did you happen to change the bitness? Make sure all your PCs are running the same python/labview bitness
05-17-2024 09:50 AM
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.
06-12-2024 05:44 AM
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?
06-12-2024 07:57 AM - edited 06-12-2024 07:57 AM
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
06-12-2024 08:10 AM
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!