Underscore

Unable to successfully save code in Validation tab

Discussion created by Underscore on Jul 19, 2012
Latest reply on Jul 19, 2012 by jskinner-esristaff
I am unable to edit, save, and apply validation code to my custom Python script in ArcGIS Desktop 10.1.

Please follow these instructions and see if you can get them to work:

1) In ArcToolbox, right-click a custom Toolbox and go to Add > Script...
2) Leave the default properties and click Next >
3) Either leave the Script File blank, or pick an existing script, or type the path of a script that doesn't exist, and click Next >
4) Click Finish
5) Right-click your new script and go to Properties...
6) Click the Validation tab
7) Click Edit..., make no changes, save if you want, and close your editor.
8) Click OK or Apply on the Properties dialog.  In my situation, I get the following message:

---------------------------
Testing get_ParameterInfo
---------------------------
initializeParameters Syntax Error: Runtime error
Traceback (most recent call last):
  File "#Script.InitializeParameters.py", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 24, in <module>
    from arcpy.toolbox import *
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\toolbox.py", line 342, in <module>
    from management import Graph, GraphTemplate
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 22, in <module>
    import _management
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_management.py", line 14, in <module>
    import _graph
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\_graph.py", line 27, in <module>
    import numpy
ImportError: No module named numpy

---------------------------
OK  
---------------------------

Note that none of these error messages talk about the file I'm editing at the time.  These are all files within the Python installation from ArcGIS Desktop.

Outcomes