Python script tool works in Desktop but fails in Web,

2562
5
Jump to solution
04-14-2013 12:29 PM
JamalNUMAN
Legendary Contributor
Python script tool works in Desktop but fails in Web,


Ian Peebles has generously shared a python script tool that display xy coordinates.

For me it is worked fine on the ArcGIS desktop, and published successfully on the server, but as it is added to the one of the web applications builders like (.Net, Silverlight, Flex), it fails to work

[ATTACH=CONFIG]23481[/ATTACH], [ATTACH=CONFIG]23482[/ATTACH], [ATTACH=CONFIG]23483[/ATTACH]

Where might be my mistake?


The python script tool, instructions and screenshots can be downloaded from the link below
http://www.mediafire.com/?5ay8m6yu777606r

Thank you

Best

Jamal

----------------
Developed by "Ian Peebles"

http://forums.arcgis.com/threads/78352-Displaying-more-than-one-

displaying (x,y) in Desktop and Web application

1. outputworkspace (folder used for scratch)
2. Script (folder that contains the XY.py script)
3. Symbology (folder that contains the output symbology as layer files)
4. Toolbox.tbx (contains the FindCoordinate script tool)

The script contains a creation of an event layer that uses your coordinate system.

Steps to follow:
1. Copy these files into a folder to your local drive or server.  You might name it Coordinates.
2. Set the scratch workspace in your .mxd.  In this case, I used: C:\Files\GIS\Coordinates\outputworkspace (Geoprocessing -- Environment -- Workspace -- Scratch Workspace)
3. Open the Toolbox and run the tool.
4. Enter in the coordinate and click OK.  Takes about 1 second to run.
5. The results will appear in the table of contents, symbolized with the coordinates labeled based on the referenced layer file.
6. If the script successfully runs, in ArcMap go to: Geoprocessing -- Results -- Current Session.
7. Right Click on the last geoprocessing results and choose Share as Geoprocessing Service.
8. Following the publishing of your geoprocessing service, you can add this into your silverlight application as a tool.
------------------------------------------------------------------
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
1 Solution

Accepted Solutions
RobertJones2
Occasional Contributor
This really isn't a developer-y problem at all:

[ATTACH=CONFIG]23548[/ATTACH]

[ATTACH=CONFIG]23549[/ATTACH]

That tool requires an advanced license, which you have on desktop but not server..

View solution in original post

0 Kudos
5 Replies
RobertJones2
Occasional Contributor
Perhaps try to run the tool from the GP service's REST endpoint: if it fails here, examine the GP service. If it succeeds, the problem is in your client app.

You might also want to look at client logs (I believe this is available in the latest Flex release) and ArcGIS Server logs.
0 Kudos
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

Perhaps try to run the tool from the GP service's REST endpoint: if it fails here, examine the GP service. If it succeeds, the problem is in your client app.

You might also want to look at client logs (I believe this is available in the latest Flex release) and ArcGIS Server logs.


Many thanks Robert for the help,

It fails to work from GP service! I got the log details below:

[ATTACH=CONFIG]23515[/ATTACH]

But how does it work on the desktop but not as service?

[ATTACH=CONFIG]23516[/ATTACH], [ATTACH=CONFIG]23518[/ATTACH]

How might this issue be overcome?

I was really struggling since long time ago with this issue and couldn�??t find any solution.
Unfortunately, I�??m not a developer to play with the code of the tool

Suggestions are highly appreciated


Best

Jamal
0 Kudos
RobertJones2
Occasional Contributor
This really isn't a developer-y problem at all:

[ATTACH=CONFIG]23548[/ATTACH]

[ATTACH=CONFIG]23549[/ATTACH]

That tool requires an advanced license, which you have on desktop but not server..
0 Kudos
by Anonymous User
Not applicable
Original User: Jamal432@gmail.com

This really isn't a developer-y problem at all:

[ATTACH=CONFIG]23548[/ATTACH]

[ATTACH=CONFIG]23549[/ATTACH]

That tool requires an advanced license, which you have on desktop but not server..


Thank you Robert for the answer,

Correct, in the python script, the �??feature to point�?� tool requires advanced license level

[ATTACH=CONFIG]23577[/ATTACH], [ATTACH=CONFIG]23578[/ATTACH]


Best

Jamal
0 Kudos
JamalNUMAN
Legendary Contributor
This really isn't a developer-y problem at all:

[ATTACH=CONFIG]23548[/ATTACH]

[ATTACH=CONFIG]23549[/ATTACH]

That tool requires an advanced license, which you have on desktop but not server..


Hi Robert,

I managed to get an evaluation copy for the ArcGIS Server Advanced and the tool worked like a charm

http://forums.arcgis.com/threads/78352-Displaying-more-than-one-%28x-y%29-point?p=295355#post295355

Many thanks

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos