Select to view content in your preferred language

Python parameter type changed during packaging from python to geoprocessing package

3672
2
04-15-2013 01:57 PM
by Anonymous User
Not applicable
Original User: dwong@lgc.com

I try to set up a geoprocessing service from a very simple python script.  The parameters are:

�?� Input Features
    o Data Type: FeatureSet
    o Type: Required
    o Direction: Input
�?� Output File
    o Data Type: File
    o Type: Required
    o Direction: Output

It looks fine in ArcMap during its packaging into gpk:

[ATTACH=CONFIG]23530[/ATTACH]

It does not look fine when I use the sample Runtime app com.esri.client.samples.geoprocessing.LocalGPTaskInfoApp to look at the parameters:

[ATTACH=CONFIG]23531[/ATTACH]

The inFeatureSet switch from the Feature Set type into the GPString type.  Subsequently, the geoprocessing operation fails with the following error that appears to be related to the parameter type:

[ATTACH=CONFIG]23532[/ATTACH]

Not sure how the parameter type gets changed in the gpk.

Need some pointers to keep the parameter type from changing.

Thanks.
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: gyoung76

Hi,
Here's what I discovered:

  • if you use either of the following forms of python code, the parameter becomes a GPString (verified by using the LocalGPTaskInfoApp sample)

  • [INDENT]InputGPFeatureRecordSetLayerPoints = "InputGPFeatureRecordSetLayerPoints [150757_04232013]"
    [/INDENT]
    [INDENT]InputGPFeatureRecordSetLayerPoints = "in_memory\\{1ECB4347-E633-41A8-9809-F3CE032625D3}"[/INDENT]
  • if you use the following form, the parameter becomes a com.esri.core.tasks.ags.geoprocessing.GPFeatureRecordSetLayer. This is the type that corresponds to FeatureSet.

  • [INDENT]InputGPFeatureRecordSetLayerPoints = "%ScratchWorkspace%\\scratch.gdb\\InputGPFeatureRecordSetLayerPoints"
    [/INDENT]

I'm not sure where or how you see the dialog that shows you the parameters are good while creating the GPK, I think you must have 10.1 SP2; so I'll give that a try. The "Working with feature sets and record sets" may give you other ideas of how to force a feature set in python.  http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000001n000000

Gayle.
0 Kudos
RavindraSingh
Frequent Contributor
I to have similar issue.

When I pass the input Parameters:
and say:
geoprocessor.executeAsync(parameters, new CallbackListener<GPParameter[]>(){
@Override
public void onError(Throwable e) {
e.printStackTrace();
return;
}

@Override
public void onCallback(GPParameter[] result) {
if(result != null){
System.out.println("success");
}
}
});


It gives following error::

com.esri.core.io.EsriServiceException: Unable to complete operation.
Error executing tool.: ERROR 000735: inGraphics: Value is required
ERROR 000735: inGraphics: Value is required
ERROR 000735: inGraphics: Value is required

at com.esri.core.io.EsriServiceException.fromJson(Unknown Source)
at com.esri.core.internal.io.handler.c.a(Unknown Source)
at com.esri.core.internal.io.handler.l.a(Unknown Source)
at com.esri.core.internal.io.handler.l.a(Unknown Source)
at com.esri.core.tasks.ags.geoprocessing.b.b(Unknown Source)
at com.esri.core.tasks.ags.geoprocessing.b.a(Unknown Source)
at com.esri.core.tasks.ags.geoprocessing.b.execute(Unknown Source)
at com.esri.core.internal.tasks.b.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
0 Kudos