Back to Blog
![]() The layers that got added had the names of your strings, and so when you pass a string the geoprocessing tool was picking it up and a layer and referencing back to the data set. When the system and Python are shut down after using sys.exit(), less memory is used after the program has been terminated. The reason the original code ran in the Interactive Python window with the strings is that layers were being created and added to the TOC when the tools were run from the Python window. Once I cleaned up the strings, the script ran as a script tool just fine. 'C:\Scripts\ProjectName\ScriptName.py' Reply 0 Kudos by KimGarbade 05-31-2022 10:13 AM Sorry. Should be depth_classified = Con (Raster (deep_water ) > max_depth, 0, 1 ) Try configuring the task action where the program/script is your Python env exe 'C:\Users\\AppData\Local\ESRI\conda\envs\arcgispro-p圓-clone1\python.exe' and the optional argument is the path to your Python script file. For example, the following depth_classified = Con (Raster ( "deep_water" ) > max_depth, 0, 1 ) A shutdown script runs after all of the transformers, readers, writers, and the log file are closed in a successful translation. This error made me realize you are passing strings of variable names instead of the the variables themselves. ![]() RuntimeError : ERROR 000732 : Input Raster : Dataset deep_water does not exist or is not supportedįailed to execute (Script ) ![]() _new_ (cls, in_raster, is_multidimensional ) I then tried running the script as a tool, but I got the following error: Traceback (most recent call last ) :įile "R:\Temp\foo\Marsh_creation_fill_volume_tool.py", line 58, in ĭepth_classified = Con (Raster ( "deep_water" ) > max_depth, 0, 1 )įile "r:\arcgis\pro\Resources\arcpy\arcpy\sa\Raster.py", line 79, in _new_ I believe since you uploaded a shape file, the "design_elevation" field was truncated to "design_ele".Īfter double checking the field names and layer names were correct, I loaded the Python code into the interactive Python window using "Load Code", and everything worked fine. ĮRROR 000728 : Field design_elevation does not exist within tableįailed to execute (PolygonToRaster ). PolygonToRaster_conversion ( *gp_fixargs ( (in_features, value_field, out_rasterdataset, cell_assignment, priority_field, cellsize ), True ) ) )įile "r:\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 511, in return lambda *args : val ( *gp_fixargs (args, True ) )Īrcgisscripting. Retval = convertArcObjectToPythonObject (gp. When I first ran it, I got the following error: Traceback (most recent call last ) :įile "r:\arcgis\pro\Resources\arcpy\arcpy\conversion.py", line 2568, in PolygonToRasterįile "r:\arcgis\pro\Resources\arcpy\arcpy\conversion.py", line 2565, in PolygonToRaster I downloaded your data and Python script. To prevent the problem from happening again, you can check that the graphics drivers are up to date (Graphics Hardware), upgrade your machines hardware (the.
0 Comments
Read More
Leave a Reply. |