POST
|
Thank you Curtis for your reply, but changing to python built-ins False or True did not allow the GP service to run. Any other ideas??
... View more
07-25-2011
04:18 AM
|
0
|
0
|
229
|
POST
|
Hello all, Could you please help me find out why and how to fix a Geoprocessing model (v10)? The current model calculates census data and needs to have an if-then-else using the Calculate Value tool. The code below is working wonderfully on desktop, but crashes in a service with the following error: Error 000539: Error running expression: x(r"c:\arcgisserver\arcgisjobs\Population_tools\model3_gpserver\jb18558850e7e47799a\scratch\scratch.gdb\Census_join") <type 'exceptions.ImportError'>: No module named collections Failed to execute Python code within Calculate Value in Geoprocessing Service: # First Calculate Value should count the number of rows in the feature class and continue with # the calculations if it is = 1 row. Expression: x(r"%Census_join%") Code Block: def x(InputFeatureClass): import arcpy result = arcpy.GetCount_management(InputFeatureClass) if int(result.getOutput(0)) == 1: return "true" else: return "false" # Second Calculate Value should count the number of rows in the feature class and continue with # the calculations if there is > 1 row. Expression: x(r"%Census_join%") Code Block: def x(InputFeatureClass): import arcpy result = arcpy.GetCount_management(InputFeatureClass) if int(result.getOutput(0)) == 1: return "false" else: return "true" Data type: Boolean Any help to make this work as a service...would be hugely helpful! Thank you.
... View more
07-22-2011
10:17 AM
|
0
|
2
|
1693
|
POST
|
Has anyone run a GP service that had a FC of approx 300,000 records as an input parameter? My service is not running with the total number of input records. I have to decrease the FC to 2200 records for it to run. The whole point of the service is to select a portion of the 300,000 records based on a bounding location into smaller FCs.
... View more
06-03-2011
05:51 AM
|
0
|
1
|
366
|
POST
|
Would the above error have anything to do with the size of the Input Parcel Parameter FC? The FC has approx 300,000 records. Thank you!
... View more
05-30-2011
05:53 AM
|
0
|
0
|
392
|
POST
|
Thanks for all of the helpful info. I have updated, I think, everything that you have mentioned. Getting the following error after running the service: updateParameters Execution Error: Runtime error <type 'exceptions.ImportError'>: No module named collections Failed. Thoughts?
... View more
05-27-2011
11:05 AM
|
0
|
0
|
392
|
POST
|
The model has been updated with all necessary tools. Input Parameters: 1) Boundary Feature Set with one or more polygons 2) Parcel Feature Set with numerous polys within Boundary Feature Set 3) Folder string to pass to "Zip Folder" script Output Parameters: 1) Zip file of parsed out Parcel polygon Feature Classes This service will pass a zipped folder to another service to complete statistical analysis. This service gives no errors after publishing and no descriptive errors at run time...just states "Failed". Thank you for your help!
... View more
05-27-2011
08:36 AM
|
0
|
0
|
392
|
POST
|
Cannot post the data online due to non disclosure agreement. But if you could message me privately or I can set up a GoTo Meeting? How do we connect for some help? Thanks, H
... View more
05-27-2011
06:32 AM
|
0
|
0
|
392
|
POST
|
Hi Andrew, I initiated and tested the zip tool. See attached model. It works well on desktop and it did publish to a service without errors. Can you or anyone else see why this service is failing? Info about model: Enter a Graphical Boundary or a Boundary Feature Class: Data Type - Feature Set Sel_Bound: Managed - in_memory\Sel_Bound Bound_Lyr: in_memory\Bound_Lyr_%Model_Value% Parcel: %scratchworkspace%\Scratch.gdb\Output\Parcel_%Model_Value% InputFolderString: \\\GEOSERVER1\ServerData\Model1a\Scratch (it crashes on desktop without the extra \ ) Data Type - String Calculate Value: Expression - "%InputFolderString%", Data type - Folder Zip Folder script - Input Data Type: Any Value, Output Data Type: file Enter the location to place the Output Zip File (must be named *.zip): %scratchworkspace%\scratch.zip Thanks!
... View more
05-27-2011
05:13 AM
|
0
|
0
|
782
|
POST
|
Since I have other iterators (ie/ iterate feature class), I cannot put the models into one process. Yes, python is an option, but the models are already built. It would take a lot more work to get this running in python. Thanks for all of your help! I will give the zipping option a try.
... View more
05-26-2011
07:14 AM
|
0
|
0
|
782
|
POST
|
Hi Andrew, That is great to know that model iterators will work in a service. The model that I posted is only a portion of the total process. I learned through testing that submodels would not work properly in a service, so I have split the whole process into three GP services that will be called by Flex to run consecutively. The final output is tabular statistics. Adding the zip option to the end of each model, then unzipping for the next model, would add run time. Is there no other way to have multiple feature set/feature class output?
... View more
05-26-2011
06:53 AM
|
0
|
0
|
782
|
POST
|
Thank you Andrew for your reply. Yes, I have gone through the services checklist quite a few times in the testing process. Yes, I am also using %scratchworkspace% for output parameters. Are model iterators possible in a service? Thanks!
... View more
05-26-2011
05:54 AM
|
0
|
0
|
782
|
POST
|
Please see the attached image of a portion of my model that does work on desktop but does not work as a service. Any suggestions would be appreciated!
... View more
05-26-2011
05:17 AM
|
0
|
0
|
782
|
POST
|
Hi, Currently I have a model that works on desktop but does not run as a service. I have narrowed down the issue to a failure of the tool, "Iterate Field Values" that is available in model builder. Is it even possible to use the iterator tools (available in Model Builder - ArcGIS 10) and have it run as a service? Or should I have only python scripts that complete the iterations? Thank you for your help! H
... View more
05-26-2011
04:37 AM
|
0
|
15
|
1844
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|