New Python Toolbox will Crash Arc Catalog

1499
15
08-29-2013 03:49 AM
JosephArmbruster
New Contributor III
Has anyone else experienced this?

- Fire up ArcCatalog or ArcMap
- Create a new Python Toolbox (do not modify anything in the default toolbox)
- Close ArcMap / ArcCatalog
- Start ArcCatalog - it will crash with a send report error box.
- Start ArcMap - it will load just fine

Notes:
- I am using ArcGIS 10.1.1.3143.
- If I copy/paste my custom toolbox code into the .pyt, it works fine from within ArcMap but ArcCatalog continues to crash.
Tags (2)
15 Replies
DanPatterson_Retired
MVP Emeritus
1  what is the error?
2  running toolboxes, IMHO, is iffy at best especially if the code expects a feature layer and not a feature class
0 Kudos
ChrisWalker5
New Contributor II
Same thing just started happening to me yesterday. I've tried repairing my ArcGIS and renaming the directory folders and root files and that didn't work either.
0 Kudos
KevinHibma
Esri Regular Contributor
In what directory did you create that PYT?
Is there any other toolboxes in the same directory, like a regular toolbox?
If you delete the PYT will ArcCatalog open?

The circumstances of this crash sound familiar, but I dont exactly recall when we fixed it. I thought it was fixed in 10.1 sp1.
0 Kudos
ChrisWalker5
New Contributor II
I have the PYT in a project folder on one of my partitions. I do have SP1 for 10.1 installed. I've tried relocating and deleting the PYT from the original directory and it still is crashing. I'm thinking about upgrading to 10.2 and see if that fixes this problem, unless I find a fix soon.
0 Kudos
KevinHibma
Esri Regular Contributor
Ok, looking through our bug queue, these are issues we've fixed in 10.2 or 10.2.1 (which we're working on right now, its not released yet). However, they're easy enough to work around by deleting a file

When ArcCatalog opens, the tree opens to one particular folder. Make sure there are no PYTs in that folder.
If there are any, move or delete them.  You can find what directory this is by looking if the registry if you aren't sure:
HKEY_Current_User\Software\Esri\Desktop10.1\ArcCatalog\Settings\LastLocation

or

Try deleting the ArcToolbox.dat found here:
C:\Users\[USER NAME]\AppData\Roaming\ESRI\Desktop10.1\ArcToolbox\ArcToolbox.dat
(this will reset your ArcCatalog profile)

Hope one of these helps

Joseph: could you post your PYT here for us to look at? thanks
0 Kudos
ChrisWalker5
New Contributor II
This step worked for me! Thanks a lot

Try deleting the ArcToolbox.dat found here:
C:\Users\[USER NAME]\AppData\Roaming\ESRI\Desktop10.1\ArcToolbox\ArcToolbox.dat
(this will reset your ArcCatalog profile)
0 Kudos
KevinHibma
Esri Regular Contributor
Glad to hear!
This particular issue looks to be fixed in 10.2:
NIM085149 -Python toolboxes crash ArcCatalog when previously run Python toolbox tool results are saved with the application.
0 Kudos
SuzanneKelly
New Contributor
Glad to hear!
This particular issue looks to be fixed in 10.2:
NIM085149 -Python toolboxes crash ArcCatalog when previously run Python toolbox tool results are saved with the application.


I've deleted the .dat file and changed the Geoprocessing results to Never Save. ArcCatalog still crashes when opened, but works just fine via ArcMap.

Any ideas?

Running 10.1 and did use a new tool from Esri before this started.

Thanks,

sk
0 Kudos
JosephArmbruster
New Contributor III
Khibma: there is nothing special about the .pyt.  We ended up just writing a plugin to force the arc toolbox itoolwindow to close before arc catalog closes 🙂


Ok, looking through our bug queue, these are issues we've fixed in 10.2 or 10.2.1 (which we're working on right now, its not released yet). However, they're easy enough to work around by deleting a file

When ArcCatalog opens, the tree opens to one particular folder. Make sure there are no PYTs in that folder.
If there are any, move or delete them.  You can find what directory this is by looking if the registry if you aren't sure:
HKEY_Current_User\Software\Esri\Desktop10.1\ArcCatalog\Settings\LastLocation

or

Try deleting the ArcToolbox.dat found here:
C:\Users\[USER NAME]\AppData\Roaming\ESRI\Desktop10.1\ArcToolbox\ArcToolbox.dat
(this will reset your ArcCatalog profile)

Hope one of these helps

Joseph: could you post your PYT here for us to look at? thanks
0 Kudos