Select to view content in your preferred language

Toolbox in Arcgis Pro will corrupt when script behind tool is renamed

2009
10
08-17-2022 11:07 AM
PhilLarkin1
Regular Contributor

After changing the file name of a python script in file explorer, which is referenced as a script in a Toolbox, all script tools in the toolbox will lose their name when displayed in Catalog View.

Version: 3.0.0

Creating a new script will result in the error below:

PhilLarkin1_0-1660759377059.png

Typical context menu for dead script tools is missing:

PhilLarkin1_1-1660759498304.png

0 Kudos
10 Replies
PhilLarkin1
Regular Contributor

Not only does this corrupt the toolbox, it corrupts the entire project!

0 Kudos
DrewFlater
Esri Regular Contributor

Hi @PhilLarkin1 , sorry you have experienced this!

When I try the same steps you described, the tools in the toolbox are not corrupted, and when I open the tool properties it simply says on the Execution page that the Script file at the previous path no longer exists. 

DrewFlater_0-1661201217712.png

If you report the bug to Esri Support we can further troubleshoot the problem. If you're willing to upload the atbx in a zip here we can start looking at the problem ASAP. 

0 Kudos
PhilLarkin1
Regular Contributor

Thanks for your help. I've attached a toolbox.

0 Kudos
DrewFlater
Esri Regular Contributor

@PhilLarkin1 which tool's executable script did you rename to cause the initial problem? 

0 Kudos
PhilLarkin1
Regular Contributor

This is just one of many test toolboxes; it is not the original toolbox that I encountered the problem. At this point I believe my project is corrupt. I simply can not create a script in a toolbox without getting the HRESULT EFAIL error described earlier.

0 Kudos
DrewFlater
Esri Regular Contributor

We can see your test tools in the atbx: asdfasdf, dfgdfg, dsfsdf, Model, Script, sdfsdf, yrdy, ZX.

But the tool list inside the toolbox has lost those tool references. 

Can you further explain how you were modifying the Python script file name in Windows File Explorer? Were you renaming a file internal to the atbx archive? It seems all the script tools in the toolbox have embedded/internal Execution script files, rather than reference paths to external standalone .py script files. 

0 Kudos
PhilLarkin1
Regular Contributor

I reinstalled ArcGIS Pro hoping this would fix the issue. Seems I still can't create scripts. Is there a registry setting i could check?

I've attached another toolbox.

0 Kudos
DrewFlater
Esri Regular Contributor

In this new toolbox I can see one tool, DeleteVersionGetParcels, but the tool is devoid of any properties or parameters. The script tool refers to an embedded script source that only includes this code

# Geoprocessing Script Tool
arcpy.AddMessage('Hello World')

So there is no reference to an external script file, which may or may not have been renamed. 

I think it will not be productive for me to try to troubleshoot the problem further, it seems to be a problem with your system or installation of ArcGIS, or there may be some other steps or conditions that are hard to diagnose via a community forum. If you are able, please contact Esri Support to explain the problem you are having and get hands on troubleshooting and support. 

0 Kudos
PhilLarkin1
Regular Contributor

Thanks for giving it a shot.

0 Kudos