LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running an executable as a windows service with a python node.

Solved!
Go to solution

Hi All,

 

I am working on creating a windows service in LabView.  I started by making a test program that would write a time stamp to a file every second and installed it using NSSM.  Works well.  Then I added a python node to just write "Hello World" into the file after the first time stamp.  It locks up on the python node when installed as a service.  It works fine running it normally.  I have confirmed that my path is set to include the python install directory in the system variables. 

 

Does anyone have any ideas?  Please help...

 

TestServicePy.zip are the files I put in C:\TestServicePy and install as a service.  TestServicePy.vi is the source code.

 

Thanks!

 

John

Download All
0 Kudos
Message 1 of 2
(159 Views)
Solution
Accepted by topic author JohnEE

I updated the VI and exe to write errors to the file.  My mistake; it doesn't lock up.  It gives the following error when trying to open the python session:

Error Number: 1671
??? in TestDBService.lvlib:TestDBService.vi<APPEND>

Python returned the following error: Error creating host process

 

It seems I caused my own problem:  I am running the 32 bit version of LabView.  I had the 32 bit version of Python 3.6.8 installed for me only and the 64 bit version installed for all users.  I uninstalled both versions then installed the 32 bit version for all users.  Problem solved!

0 Kudos
Message 2 of 2
(104 Views)