Analyzing and Publishing GP Script Tool VERY SLOW!

604
5
01-18-2013 08:14 AM
DaveHighness
Occasional Contributor II
I have a Python Script Tool that I am trying to publish to an Geoprocessing Service. It is a pretty simple script and runs fine in ArcCatalog. I published it once and it went fast. Then I needed to change some input parameters so I deleted the service and I recreated the tool and tried to publish again. I renamed everything. The Analyze in ArcCatalog finished without any errors but took a long time (~15 minutes). I then rebooted the server and am now trying to Publish from the Service Definition and it is really slow once again. It has taken 10 minutes and is only at Creating Service Definition. Dang I hate these black boxes! What is going on? I miss the 10.0 method of publishing!

Thanks, Dave
Tags (2)
0 Kudos
5 Replies
DaveHighness
Occasional Contributor II
Ok, so I think I figured out that its trying to package up a huge pile of stuff. Only thing is, this script doesn't really use any data. Gad, I wish I had more control over this process!!!

Dave
0 Kudos
DaveHighness
Occasional Contributor II
After many hours with ESRI Tech Support we figured out what the problem was. I had added the "PYTHONPATH" system environment variable at some point and this confused the ArcCatalog Publishing Task so that it could not find Python. This basically sends the Publishing Task into an endless loop and you don't know what is going on and nothing is happening. For some reason you cannot publish scripts that import the os library. Scripts without that still publish.

In short, DO NOT add a "PYTHONPATH" system environment variable!

Why did I do it? I think I've been adding that variable for years. It was recommended to me at some point for using Python at the command line. Doh!

Thanks, Dave
0 Kudos
KevinHibma
Esri Regular Contributor
After many hours with ESRI Tech Support we figured out what the problem was. I had added the "PYTHONPATH" system environment variable at some point and this confused the ArcCatalog Publishing Task so that it could not find Python. This basically sends the Publishing Task into an endless loop and you don't know what is going on and nothing is happening. For some reason you cannot publish scripts that import the os library. Scripts without that still publish.

In short, DO NOT add a "PYTHONPATH" system environment variable!

Why did I do it? I think I've been adding that variable for years. It was recommended to me at some point for using Python at the command line. Doh!

Thanks, Dave


Can you post the incident number? I want to investigate this, but I'll try to spare you from repeating your conversation with tech support again on the forums 🙂
0 Kudos
DaveHighness
Occasional Contributor II
Kevin, Incident #1116319.
0 Kudos
KeG
by
New Contributor II
what ever became of this issue? I'm seeing analyze and publish times over an hour each!
The process of publishing a gp tool is deplorable. How could it have gotten so much worse in a new release?