ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Python Node

Hi,

I was used Labview 2019 64 bit with Python Node with Python 3.6.0. 64 bit in Windows 10 64 bit.

I Used tensorflow-gpu=2.5.0 in my python code and that python file run in labview with pyhton node.

i get below error when run python node.

 

??? in DL_Main_Window_4.vi<APPEND>

Module Path: D:\Projects\Python Projects\M1.py
Function Name: load_Cmodel1
Python returned the following error: <class 'AttributeError'>
module 'sys' has no attribute 'argv'
<traceback object at 0x00000246CD7BE808>


Call Stack information:
['Traceback (most recent call last):
', ' File "D:\Projects\Python Projects\M1.py", line 3, in <module>
import tensorflow as tf
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\__init__.py", line 49, in <module>
from ._api.v2 import __internal__
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\_api\v2\__internal__\__init__.py", line 13, in <module>
from . import distribute
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\_api\v2\__internal__\distribute\__init__.py", line 10, in <module>
from . import combinations
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\_api\v2\__internal__\distribute\combinations\__init__.py", line 10, in <module>
from tensorflow.python.distribute.combinations import generate
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\distribute\combinations.py", line 37, in <module>
from tensorflow.python.distribute import multi_process_runner
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\distribute\multi_process_runner.py", line 39, in <module>
from tensorflow.python.distribute import multi_process_lib
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\distribute\multi_process_lib.py", line 60, in <module>
if _is_enabled():
', ' File "C:\Program Files\Python36\lib\site-packages\tensorflow\python\distribute\multi_process_lib.py", line 39, in _is_enabled
tpu_args = [arg for arg in sys.argv if arg.startswith(\'--tpu\')]
', "AttributeError: module 'sys' has no attribute 'argv'
"]

 

i was already set all environmental variables as per requirements. But can't get success to run my python file with python node.

also noted when i used Intregrated Python toolkit that time same python file runs well any problem but when  used python node that time above error occurs.

 

0 Kudos
Message 1 of 3
(1,724 Views)

https://stackoverflow.com/questions/30343225/how-to-handle-errors-related-to-sys-argv-in-python

 

You try to call a module that expects an argv argument being passed to but don't pass that in.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 3
(1,716 Views)

See My python code and Labview Code.

 

I was install python 3.6.0 64 bit in windows 10 64 bit.

tensorflow-gpu version 2.5.0

 

 

Download All
0 Kudos
Message 3 of 3
(1,713 Views)