0

I am using ArcGIS for Desktop 10.1 (Arc Info license) and ArcGIS for Server 10.1 and automating few things on server level and getting interesting errors.

I am overwriting map service through this script. The scripts works fine in ArcGIS Desktop environment. When I tried to run script outside of ArcGIS i.e cmd, it is getting an error.

I tried following things at my end:

  1. My environmental variable is set properly

  2. I have imported all ArcPy, OS modules & toolbox module.

  3. After getting an error service is not overwriting.

  4. Researching on my side.

  5. Script code works fine in the ArcMap

Still getting an error & wondering that it is working greatly in ArcMap but outside of ArcGIS why it is not working?

Any help will be great !! thanks in advance : )

Please check complete code and screenshots

Screenshot 1

Screenshot 2

1

The script is only designed to work with shapefiles in a folder, unless you have made serious modifications to it to accommodate other data input types and destinations.

  • Thanks for reply. I am working on same issue. After resolving the question I will mark this answer. – Sunil May 25 '13 at 4:42
1

I looked at your error message in the cmd.exe window then looked at your script via your link. The error is failing on SplitLayerByAttributes.py

I'm wondering if the error is caused by the line import arcpy.mapping.toolbox because if I type that into IDLE it throws an error?

  • Thanks for the reply..yes error is failing on SplitLayerByAttributes.py and working on this right now. – Sunil May 25 '13 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.