LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabPython does not function after being built into an executable application (am i missing DLLs or Paths?)

Solved!
Go to solution

Greetings!!

 

I have recently been playing around with the amazing power of Python in Labview and have built some very functional VIs that utilize this tactic. However I now find myself at a bind. Everything runs great in the IDE, but not so great as a standalone application.

 

i am running:

 

Windows 7 64bit

Labview 2012 32bit

Python 2.7.3 32bit

 

My build specifications configuration attempts have all failed to run Python, and the application typically always return a very non descriptive error such as:

 

PYTHON New Session__ogtk.vi->NameOfMyVIFile.vi

 

I have tried adding DLLs to the "always include" section of the build spec.

DLLs such as:

 

Lvpython.dll

pytscript.dll

 

and I have even tried including them in both the support directory and the caller's directory to no avail. I have even tried placing the entire application + supporting files in my main Labview and python directories just to see their behavior with no apparent differences.

 

so now I’m left with no options that i can think of. and I'm sure I have crawled around Google so much now that I’ve read all the same posts and websites nearly three times already.

 

Please help me debug this!! I’m sure it’s something super simple but not very obvious that I’m missing.

 

I hope everyone has a great day, and thank you!

Grant.

 

0 Kudos
Message 1 of 5
(4,082 Views)

Where is your python27.dll located and how are you specifying the server in the configuration?

0 Kudos
Message 2 of 5
(4,071 Views)

My python installation folder is "C:\Python27" and python27.dll is located in there.

 

initially i ran the "PYTHON Set Server Path" with an input string equal to: 'C:\Python27\python27.dll' while in the IDE. i have read however that (as long as the system path in windows is configured correctly) passing a string of just 'python27.dll' would work, but i did not try this.

 

after that the "PYTHON Script Node" is what i used to test LabPython and all's ok in the IDE but not in applications.

 

i have also tried this as an executable:

 

LabPython build spec.png

LabPython.png

 

 

 

 

 

 

 

 

 

Which porduces this:

 

LabPython front p.png

0 Kudos
Message 3 of 5
(4,066 Views)
Solution
Accepted by codemonger

Try configuring the server within the executable.

Message 4 of 5
(4,056 Views)

The configuration for the DLL server path is stored in the application ini file. So Darin's solution is the right one.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 5
(4,024 Views)