<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Labview Application Web Server: a service launching Python node or an exe in LabVIEW</title>
    <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982728#M1136841</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have some services published with Application Web Server in LabVIEW 2018 and W10.&lt;/P&gt;
&lt;P&gt;I need to call a published service which contains a Python node, so I used two different approaches:&lt;/P&gt;
&lt;P&gt;1) The web service .vi works fine when in LabView environment, but after deploying a call to the service gives an error in output.&lt;/P&gt;
&lt;P&gt;I checked out that the error comes out directly from the "Open Python session" vi, so it is not directly retated with the .py code.&lt;/P&gt;
&lt;P&gt;2) After this failure, I tried to compile an exe with the Python node call. The exe works fine.&lt;/P&gt;
&lt;P&gt;Then I tried to call this exe inside the web service (through the system exec command), and again this works fine when running the .vi, but not when it is published as a web service.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it seems that a web service cannot call external executables nor external interpreters (such as Python).&lt;/P&gt;
&lt;P&gt;Is it related with some security issues? Is there any workaround?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 16:49:19 GMT</pubDate>
    <dc:creator>Marco_Ge</dc:creator>
    <dc:date>2019-10-29T16:49:19Z</dc:date>
    <item>
      <title>Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982728#M1136841</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I have some services published with Application Web Server in LabVIEW 2018 and W10.&lt;/P&gt;
&lt;P&gt;I need to call a published service which contains a Python node, so I used two different approaches:&lt;/P&gt;
&lt;P&gt;1) The web service .vi works fine when in LabView environment, but after deploying a call to the service gives an error in output.&lt;/P&gt;
&lt;P&gt;I checked out that the error comes out directly from the "Open Python session" vi, so it is not directly retated with the .py code.&lt;/P&gt;
&lt;P&gt;2) After this failure, I tried to compile an exe with the Python node call. The exe works fine.&lt;/P&gt;
&lt;P&gt;Then I tried to call this exe inside the web service (through the system exec command), and again this works fine when running the .vi, but not when it is published as a web service.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it seems that a web service cannot call external executables nor external interpreters (such as Python).&lt;/P&gt;
&lt;P&gt;Is it related with some security issues? Is there any workaround?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 16:49:19 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982728#M1136841</guid>
      <dc:creator>Marco_Ge</dc:creator>
      <dc:date>2019-10-29T16:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982852#M1136890</link>
      <description>&lt;P&gt;Without knowing more, it's really just a guess, but perhaps your web application runs as a different user (to your IDE, which typically runs as the logged on user unless you run as Admin) and this changes your PATH, or a similar environment variable.&lt;/P&gt;
&lt;P&gt;It could also be that the NI Web Service service has a reduced path intentionally to prevent pulling in all sorts of other things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the error you get from the Open Python Session VI?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 01:16:33 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982852#M1136890</guid>
      <dc:creator>cbutcher</dc:creator>
      <dc:date>2019-10-30T01:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982900#M1136906</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;The error coming out from the service call (such as: &lt;A href="http://localhost:8080/WSMichelin/python_call_save?" target="_blank"&gt;http://localhost:8080/WS/python_call&lt;/A&gt;) in which the .vi opens a Python session is the following (I have packed it inside the JSON reply coming out from the service call by the browser):&lt;/P&gt;
&lt;PRE&gt;Python returned the following error: Error creating host process.&lt;/PRE&gt;
&lt;P&gt;This error never comes out when running the .vi from LabVIEW or from an EXE.&lt;/P&gt;
&lt;P&gt;The .vi published as a service simply opens and closes a Python session, without executing any .py code, at the moment.&lt;/P&gt;
&lt;P&gt;Calls and executions (service, browser and Application Web Server) are in the same machine, at the moment, and I am logged as Administrator.&lt;/P&gt;
&lt;P&gt;Installed Python is 3.6 with Anaconda and OS is W10Pro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 07:41:42 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982900#M1136906</guid>
      <dc:creator>Marco_Ge</dc:creator>
      <dc:date>2019-10-30T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982914#M1136911</link>
      <description>&lt;P&gt;Update: I tried to compile a .dll with LabVIEW including the Python call&amp;nbsp; and I've put the call inside the web service vi.&lt;/P&gt;
&lt;P&gt;Again, the .vi works fine in LV environment, but, once it is published as a WS, I have a dll error after the call&amp;nbsp; (error 1671).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 08:56:16 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3982914#M1136911</guid>
      <dc:creator>Marco_Ge</dc:creator>
      <dc:date>2019-10-30T08:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3983010#M1136971</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/96760"&gt;@Marco_Ge&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Installed Python is 3.6 with Anaconda and OS is W10Pro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Aha! So, I haven't tried using Anaconda, but I have seen a few posts around the forum about using it with LabVIEW. It seems to often be a problem... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can try reading through these and see if anything jumps out, but I'd also wonder if you might have better luck if you're able to use a non-Anaconda version of Python... (that being said, I don't know enough about Anaconda to say it's definitely the issue)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/en/support/documentation/supplemental/18/installing-python-for-calling-python-code.html" target="_blank"&gt;Integrating Python Code in LabVIEW&amp;nbsp;&lt;/A&gt;(claims not possible)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.ni.com/t5/LabVIEW/Labview-2018-Python-Node-and-Anaconda-Environment/td-p/3853701/" target="_self"&gt;Labview 2018 Python Node and Anaconda Environment&lt;/A&gt;&amp;nbsp;(looks like they gave up, although 2nd page has some points on a workaround)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Admittedly, since it's working in the dev environment, I'm not convinced it's a Python problem. I still suspect some change in environment settings when the web server runs compared to LabVIEW IDE being run as your local user (with or without administration rights, via UAC).&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 11:29:51 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3983010#M1136971</guid>
      <dc:creator>cbutcher</dc:creator>
      <dc:date>2026-03-04T11:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3983061#M1136998</link>
      <description>&lt;P&gt;Hi cbutcher,&lt;/P&gt;
&lt;P&gt;I think I've found the issue...&lt;/P&gt;
&lt;P&gt;After uninstalling and reinstalling various versions of Python, I found that the call of the service works fine only with Python 2.7, while it is not working with 3.6.5 or 3.6 versions!&lt;/P&gt;
&lt;P&gt;Many thanks for your interest in solving this issue.&lt;/P&gt;
&lt;P&gt;Have a nice day.&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 15:28:19 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3983061#M1136998</guid>
      <dc:creator>Marco_Ge</dc:creator>
      <dc:date>2019-10-30T15:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Labview Application Web Server: a service launching Python node or an exe</title>
      <link>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3983087#M1137017</link>
      <description>&lt;P&gt;Hi Marco,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm glad you got it fixed, so go ahead and use 2.7 if it suites your needs, but if you'd prefer to use 3.6, I'd guess maybe this bit:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/96760"&gt;@Marco_Ge&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;After uninstalling and reinstalling various versions of Python...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;is more relevant than the version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, good luck &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 16:14:23 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Labview-Application-Web-Server-a-service-launching-Python-node/m-p/3983087#M1137017</guid>
      <dc:creator>cbutcher</dc:creator>
      <dc:date>2019-10-30T16:14:23Z</dc:date>
    </item>
  </channel>
</rss>

