I have recently upgraded to ArcGIS 10.3 and all my script tools are not working. For some reason, within any ArcGIS process, the built-in sys module does not have the argv attribute. It works as expected in stand-alone. This affects me because I use sys.argv in virtually all the script tools I have developed for my organization (70+) to pass in arguments.
For example, if I have a function like this:
def function(arg1, arg2, arg3): pass
It is easier to call the function and pass in parameters from a script tool like this:
param1 = arcpy.GetParameterAsText(0) param2 = arcpy.GetParameterAsText(1) param3 = arcpy.GetParameterAsText(2) function(param1, param2, param3)
However, after the upgrade, ONLY in any ArcGIS process the sys module is lacking the argv attribute. See pictures below:
fails in ArcGIS Python Window
and works as expected in regular IDLE shell
Is there something different about how ArcGIS is accessing Python in version 10.3?