Unable to publish python script as geoprocessing service

1692
1
08-06-2014 11:11 AM
JonathanMeyer
New Contributor

I have run into an issue with an ArcGIS server and ArcMap (10.1 SP1) setup that I am hoping someone may have also run into.  I am trying to publish a python script as a  geoprocessing service in ArcMap on a client’s server.  The script runs and publishes without issue on my personal machine, a development machine, and a development machine my client provided for us on their network.  However, on the clients production server as soon as you click Analyze or Publish, from within the publishing wizard, ArcMap hangs, one CPU maxes out, and the process never returns.  No error messages are ever displayed or logged. This seems to be an issue with any geoprocessing tool that uses a python script, as publishing a standard Arc toolbox tool works.  I have tried running the Arc Toolbox tool that the wizard runs behind the scenes (Stage Service) and I get the same result.  I have also tried running the toolbox tool directly from a python interpreter and also get the same result.  I have tried about everything I can think of except reinstalling ArcMap.  Just to verify my python script isn't the issue I have tried publishing a script that only takes a single input and returns that same output.  This also does not work.

Any suggestions or ideas of things I could try they would be much appreciated.

0 Kudos
1 Reply
KevinHibma
Esri Regular Contributor

I'd have to see the script to determine what the exact issue is - but this reminds me of a possible issue thats fixed in 10.2.

When publishing a script, all the references are looked at and scanned to see what data is required to publish.

Some scripts, depending on how and what they referenced could get into a lot of python files and the hang you see is just the system being busy (hard at work inspecting) and eventually it'll come back. Or it could be an endless loop, which wont ever come back --its hard to know whats happening here.

In short, if you're able to upgrade, I'd expect the problem would go away. If you can't upgrade, I'd check 1) for if you have any variables in your script pointing at folders -- if you do, whats in them. Try to clean that code up if possible. Otherwise you can post your script and I'll try to point out anything that might be causing this.

0 Kudos