|
POST
|
I get this back: { "error" : { "code" : 499, "message" : "Token Required.", "details" : null } }
... View more
10-11-2012
05:50 AM
|
0
|
0
|
1461
|
|
POST
|
There are ways around some of these restrictions. In your case you could run your tool in arcmap but just comment out the line that commits to the db. Then publish your service and try to find out where esri is hiding the modified copy of your py file -search your ags machine. Then you can edit that py file to uncomment your commit line. Not a glamorous workflow. But i think as long as you dont mess with the parameters or external data sources you can get away with that.
... View more
10-02-2012
09:29 AM
|
0
|
0
|
506
|
|
POST
|
not sure about the data referencing. I would make sure the service you are publishing is synchronous just to start out. After you publish the service via ags you can then add that tool back into your toolbox in arcmap. At that point you will have two versions of the same tool (one is disk based and the other is ags based). When you run the ags-based gp version you will see the same types of error messages in your Results pane in ArcMap. That can be helpful for debugging. Also, when published you should still be getting error/message information from your tool. It may be harder to find now though. You can check the esri logs or you can try to run your gp service tool directly from the rest api page as you will get messages back there as well. In cases where you aren't sure if your code is doing things you want it to do i typically litter my code with messages coming out - one after every line if you have to. This way you will know where it breaks and why. Also, check that if the tools/methods you are calling have return params and you can pipe those out as messages as well. Are any of the tools you are using possible license-restricted on ags?
... View more
10-02-2012
09:27 AM
|
0
|
0
|
689
|
|
POST
|
I think you should just add another parameter that has a direction of Output and call it something like result and make it a string. When you test to see if the table has had records added write a statement that compares the number of records added with what you expect and if it is equal return "true" in your output param otherwise "false". If you don't have any params with type output you are not going to get any output.
... View more
10-02-2012
08:59 AM
|
0
|
0
|
1497
|
|
POST
|
I feel your pain 100% Ryan http://forums.arcgis.com/threads/66230-Anyone-using-the-new-Python-Toolboxes-at-10.1?p=233368#post233368 I have been struggling with this since we started working in 10.1 We had many upgrade tasks to get our old apps up to snuff at 10.1 (editing, printing, etc.). I never would have guessed that upgrading the gp tools would have been the most time consuming. Now my estimates are off and i'm bleeding on this task. To answer only one of your questions - you can add multiple tools to a toolbox that you turn into a service. In the publish dialog inside of ArcMap there is a button up at the top near the Stage/Analyze buttons that says something like Add Result. That is for adding another tool to a current toolbox. I think this page describes the issue quite succinctly: http://resources.arcgis.com/en/help/main/10.1/index.html#/Migrating_geoprocessing_services_from_version_10_to_10_1/0154000004t9000000/ the top explains the process for publishing at 10.0 (note the single line of text describing a very easy process). The rest of the page (40 or 50 lines) describes the 'new and improved' process for publishing at 10.1 After a few discussion with esri support the gist i got was that we could not 'just publish' tools because we need to make sure they work properly. Or rather, esri needs to make sure they work properly. So everything must run successfully in ArcMap before it is stamped with approval for publishing. Never mind that some tools require extensive setup to be run, some run against data you don't want to modify, some run with entirely different datasets and needs from the other tools you want in the toolbox, and a whole host of other reasons why you wouldn't run all of the tools you want to create in a single map document. And it gets worse. When you run your tool in ArcMap, so it gets the stamp of approval, esri will modify your script for you so that it works better!
... View more
10-02-2012
05:44 AM
|
0
|
0
|
506
|
|
POST
|
sounds like you have a lot vested in python and gp tools so this is probably not an option but it seems like the trend esri would want you to move toward would be using the REST api on a feature service to do these edits. Perhaps there is some hint in how the rest api gets it done (assuming that works as expected). sorry i couldn't be more helpful. I too have alot of code vested in python gp tools and the new publish routine is kicking my butt. It's a hassle to publish one gp tool, let alone 30 tasks in one gp service.
... View more
10-01-2012
05:25 AM
|
0
|
0
|
1309
|
|
POST
|
Are you saying that you needed to restart your rest service or the entire ags process? If the latter, then doesn't that kick everyone out of their applications and desktop if they are using ags services? Also, is there a way to put a version number or other identifying tag on your build so you can see for certain when it has changed?
... View more
10-01-2012
05:09 AM
|
0
|
0
|
750
|
|
POST
|
Is that toolset exposed in ArcCatalog? I seem to recall that it is only available as python tools. but if it were a tool in ArcCatalog you could run it from there and see the python being cranked out.
... View more
10-01-2012
05:06 AM
|
0
|
0
|
1181
|
|
POST
|
Or, even better, is there a way to generate the web_map_as_json string client-side without shipping it off?
... View more
09-28-2012
12:23 PM
|
0
|
0
|
1730
|
|
POST
|
Does anyone know if there is a way i can jack the api-generated request before it goes over the wire so i can inject these missing elements myself? Is there an event that provides access to the generated request after the printTask.execute method is called?
... View more
09-28-2012
12:20 PM
|
0
|
0
|
1730
|
|
POST
|
Also, what if i want to pass in, say, 5 additional fields. Would those all be extra params in the python or would i have to parse them in with a delimiter and jam them into a single field? crud.
... View more
09-28-2012
11:50 AM
|
0
|
0
|
1730
|
|
POST
|
maybe this will be fixed in service pack 1? Pretty please...
... View more
09-28-2012
11:48 AM
|
0
|
0
|
1730
|
|
POST
|
Ugh. I just wasted 3 hours trying to figure this out. Why have something exposed by the REST api then not support it in the js api? This makes the task of exposing a simple extra text element much more complex. So your saying that now i have to generate a custom python script just to handle this. that stinks. but thanks for the info.
... View more
09-28-2012
11:47 AM
|
0
|
0
|
1730
|
|
POST
|
Still not where i want to be on this one unfortunately. I can get all the py and pyt files in order but that still doesn't get me around having to use ArcMap to create the sd file. And when that sd file gets published all of the sudden there are lots of new files and folders and my code is being modified by esri hand-holding. When i publish the sd esri's convoluted directory structure makes this: -GPServiceName.GPServer -extracted .GPServiceName.sd then in the extracted folder we have: -esriinfo -v101 .manifest.xml .serviceconfiguration.json tilingservice.xml under esriinfo we have more: -metadata -thumbnail .iteminfo.xml thumbnail is just an image, the metadata folder has a file named metadata.xml under v101 we have: afoldernamedafterwhereyouputyourscripts GPServiceName.tbx GPServiceName.rlt the tbx and rlt are binary under the folder that esri creates based on your script folder you have: all of your py files, pyc versions for each, a param text file that i was using and esri dragged in, along with any 'helper' py files the pyt file for your original python toolbox a pyt.xml for the toolbox a Tool.pyt.xml for the toolbox pyt.xml files for each Tool in the toolbox Python toolboxes provide the opportunity to take advantage of your Python skills and create tools entirely and easily out of Python perhaps. but getting them published is a different story. Say i want to add a Tool to my currently published GPService? Not fun at all. I have to open my pyt, edit it, open it in ArcMap, run EVERY OTHER TOOL including my new tool and then publish? Certainly i'm missing some very important in this workflow. At ArcGIS 9.0, the script tool framework was first introduced and is geared towards creating Python-based tools for new users, but it is an inefficient process for more experienced users. In the script tool framework: You define parameters through the wizard You create validation code that lives in the toolbox Plus you create and maintain the source script separately All of these parts are segregated and more difficult to manage collectively. That workflow is starting to look a lot better in hindsight.
... View more
09-18-2012
05:37 AM
|
0
|
0
|
510
|
|
POST
|
that is pretty much what i did. For each individual py script i had i changed the signature and made a main def. then in the pyt i import each of those, then call the script by name.main. i like this because each of my scripts was pulling in a params json file. now i can pull that params file into the pyt once and dish it off to each side script. All that remains is for me to find a way around esri wanting me to run each script in arcmap and publish the results. if i could find a way to just publish the pyt once then throw the extra scripts in there and have them recognized that would be the bomb
... View more
09-07-2012
06:47 AM
|
0
|
0
|
3484
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-03-2012 10:21 AM | |
| 4 | 01-02-2018 12:11 PM | |
| 1 | 01-04-2011 07:47 AM | |
| 2 | 09-05-2012 05:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|