POST
|
I'm still frustrated by this problem. Has anyone gained any more insights into this in the past two years?
... View more
02-11-2019
06:12 PM
|
0
|
0
|
521
|
POST
|
I'm running ArcGIS Server 10.6 and have a geoprocessing tool (built as part of a Python toolbox) that, depending on inputs, can have between 1 and 120 output layers created (a mixture of feature classes and raster datasets). I have some input tickboxes (a handful, not 120) which determine which of these output layers are generated. The output layers are populated by using the arcpy.SetParameter function. I publish the tool with all the tickboxes ticked - i.e. all the outputs are generated before publishing. Then I run the geoprocessing task on the server with only some of the tickboxes ticked. In the code, this means that the arcpy.SetParameter function is only called for some of the output parameters. If I do this, then I get the following error: Invalid return value: d:\arcgis\arcgisserver\directories\arcgisjobs\emptydatasettest_gpserver\j7d4d794fa57f46fe9740e483f3f18e79\scratch\outputSF.shp Failed. Here's a much simplified example of what I'm talking about: Tool parameters params = []
# 0 Tickbox
param = arcpy.Parameter()
param.name = u'Tickbox'
param.displayName = u'Output the shapefile as a layer?'
param.parameterType = 'Required'
param.direction = 'Input'
param.datatype = u'Boolean'
param.value = u'False'
params.append(param)
# 1 Input_shapefile
param = arcpy.Parameter()
param.name = u'Input_shapefile'
param.displayName = u'Input shapefile'
param.parameterType = 'Required'
param.direction = 'Input'
param.datatype = u'Feature Layer'
params.append(param)
# 2 Output_shapefile
param = arcpy.Parameter()
param.name = u'Output_shapefile'
param.displayName = u'Output shapefile'
param.parameterType = 'Derived'
param.direction = 'Output'
param.datatype = u'Feature Layer'
params.append(param)
return params Tool execution code if tickbox == 'true':
outShapefile = os.path.join(arcpy.env.scratchFolder, "outputSF.shp")
arcpy.CopyFeatures_management(inShapefile, outShapefile)
arcpy.SetParameter(2, outShapefile) If the tickbox is checked then the output layer displays correctly. If the tickbox is not ticked then the above error is thrown. I've been able to add a workaround so that if the tickbox isn't checked then an empty shapefile is used to set the parameter value. However, as I've got 120 potential outputs, I don't want to employ this workaround as I'd possibly end up with (say) 5 output layers that have values and 115 ones that are empty, which is pretty ugly. If I publish the tool with none of the tickboxes checked, then the output layers are not generated even if I tick the boxes. Does anyone know of any way to have an output layer declared in the tool parameters and is then not populated by the code without generating this error? Thanks!
... View more
01-27-2019
02:17 PM
|
1
|
0
|
401
|
POST
|
Both of these programmatic fixes work for me in the Python window within ArcGIS Pro. However, I can get neither of them to work as part of a Python Toolbox tool script.
... View more
07-02-2018
03:30 PM
|
1
|
0
|
1351
|
POST
|
I'm trying to do the same thing - set the coordinate system of an ArcGIS Pro Map object using arcpy. Just downloaded ArcGIS Pro 2.2 and there still doesn't seem to be a way. Anybody come across any solutions / workarounds in the last couple of years?
... View more
06-26-2018
03:12 PM
|
0
|
0
|
1061
|
POST
|
Same here, and I'm seeing the same problem with applying symbology to rasters too.
... View more
06-18-2018
03:50 PM
|
0
|
0
|
3233
|
POST
|
Hi Sean I'm having the same problem with arcpy.ApplySymbologyFromLayer_management in ArcGIS Pro 2.1. You find any solution to the problem?
... View more
06-18-2018
03:17 PM
|
0
|
2
|
3233
|
POST
|
Solved my problem. The issue was that 3 services in the System folder (RasterAnalysisTools, RasterProcessing and RasterRendering) were stopped. As far as I can work out they come with the ArcGIS Image Server package and they're stopped by default unless you link the Image Server with the ArcGIS portal (my ArcGIS Server is part of the base ArcGIS Enterprise installation I did using the ArcGIS Enterprise Builder). Sp, you can just start the services manually, but if you link the Image Server to Portal then these services start automatically which is handy if/when you restart the server. Here's the docs that tell you how to do this. I worked out that the problem was something to do with Image Server by looking in the ArcGIS Server logs. I found the following SOAP error: Error handling request to service 'System/RasterProcessing.ImageServer'. java.lang.Exception: Could not find service. Service may be stopped or it may not be configured. It seems that even though I couldn't find any documentation saying that Spatial Analyst depends on the Raster Analysis server (and hence Image Server) to be present / running, it seems that it does. An aside: weirdly, the Fill tool ran ok before starting the 3 raster analysis services up when I ran it in an IDLE session on the server and not as part of a geoprocessing task. I only had this problem when running it as a GP task.
... View more
04-03-2018
01:19 AM
|
2
|
0
|
4606
|
POST
|
I tried that but no joy. The problem is definitely with the Fill function.
... View more
04-02-2018
04:34 PM
|
0
|
0
|
4606
|
POST
|
Forgot to say - the ArcGIS Server is part of a base ArcGIS Enterprise install I did using the ArcGIS Enterprise Builder.
... View more
04-02-2018
02:41 PM
|
0
|
0
|
4606
|
POST
|
My geoprocessing service is failing with the errors: ExecuteError: ERROR 999999: Error executing function. An event was unable to invoke any of the subscribers [Execute error] Bad syntax in request. (status code 400). And here's the script that is being called. p0 is the derived output raster and p1 is the input raster. def function(p0, p1): import arcpy import os from arcpy.sa import * scratchFolder = arcpy.env.scratchFolder arcpy.AddMessage('arcpy.env.scratchFolder: ' + arcpy.env.scratchFolder) arcpy.AddMessage(str(p1)) output = os.path.join(scratchFolder, "output.tif") arcpy.AddMessage(output) Fill(p1).save(output) arcpy.SetParameter(0, output) return I'm running ArcGIS Server 10.6 on Windows Server 2016 and the geoprocessing service was published from ArcGIS Desktop 10.6 on my PC running Windows 7. The server does not have ArcGIS desktop installed on it and never did. Initially I thought it was a Spatial Analyst licencing problem but if I swap the offending Fill(p1).save(output) line with Negate(p1).save(output), with Negate being another SA tool, then it works fine and so the licence is ok. FlowDirection also fails in the same way as Fill. The tool runs fine on ArcGIS Desktop on my PC. This is a simplified version of my tool to illustrate the error more clearly. Here's the complete output messages from the script in case that helps: Server Messages Submitted. Executing... Executing (SA test): SATest d:\arcgis\arcgisserver\directories\arcgisjobs\satest_gpserver\j08d619f38d944d2a8df0cfae9a06d975\scratch\Input_raster.tif Start Time: Tue Apr 3 09:24:09 2018 Executing (SATest): SATest d:\arcgis\arcgisserver\directories\arcgisjobs\satest_gpserver\j08d619f38d944d2a8df0cfae9a06d975\scratch\Input_raster.tif Start Time: Tue Apr 3 09:24:09 2018 Running script SATest... arcpy.env.scratchFolder: d:\arcgis\arcgisserver\directories\arcgisjobs\satest_gpserver\j08d619f38d944d2a8df0cfae9a06d975\scratch d:\arcgis\arcgisserver\directories\arcgisjobs\satest_gpserver\j08d619f38d944d2a8df0cfae9a06d975\scratch\Input_raster.tif d:\arcgis\arcgisserver\directories\arcgisjobs\satest_gpserver\j08d619f38d944d2a8df0cfae9a06d975\scratch\output.tif Traceback (most recent call last): File "<string>", line 97, in execute File "C:\python27\ArcGISx6410.6\lib\site-packages\LUCItools\wstools\wst_sa_test.py", line 13, in function Fill(p1).save(output) File "c:\program files\arcgis\server\arcpy\arcpy\sa\Functions.py", line 2289, in Fill z_limit) File "c:\program files\arcgis\server\arcpy\arcpy\sa\Utils.py", line 53, in swapper result = wrapper(*args, **kwargs) File "c:\program files\arcgis\server\arcpy\arcpy\sa\Functions.py", line 2285, in Wrapper z_limit) File "c:\program files\arcgis\server\arcpy\arcpy\geoprocessing\_base.py", line 510, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) ExecuteError: ERROR 999999: Error executing function. An event was unable to invoke any of the subscribers [Execute error] Bad syntax in request. (status code 400). Failed to execute (Fill). Failed to execute (SATest). Failed at Tue Apr 3 09:24:09 2018 (Elapsed Time: 0.37 seconds) Failed to execute (SA test). Failed at Tue Apr 3 09:24:09 2018 (Elapsed Time: 0.40 seconds) Failed. Thanks in advance!
... View more
04-02-2018
02:33 PM
|
0
|
4
|
8604
|
POST
|
I've got a Python toolbox which contains a tool that performs some parameter validation via the updateParameters method (within the ToolValidator class). This method enables/disables some parameters depending on the values of others. This all works fine when running it on ArcMap 10.4. But when I publish the tool as a geoprocessing service to ArcGIS Server 10.4 the validation no longer seems to work. i.e. When performing the same actions that trigger some parameters to become disabled (add some text to another parameter) on Desktop, these actions do nothing when running the geoprocessing service from ArcMap. No parameters are disabled. Does anyone else have any experience of performing parameter validation for geoprocessing services on ArcGIS server? Or is able to give some suggestions as to how I can get this working? Thanks!
... View more
04-11-2017
02:27 PM
|
0
|
2
|
1245
|
POST
|
Thanks Tim That was indeed the problem. I hadn't realised that I had to accept the terms and conditions on the website first before using Cloud Builder. Should've read the instructions more carefully I guess. Cheers, Keith
... View more
03-16-2016
08:00 PM
|
0
|
0
|
424
|
POST
|
Hi I'm using Cloud Builder to create an ArcGIS for Server 10.4 site on Amazon Web Services (AWS). I'm pretty much choosing the defaults (Windows, no geodatabase, mxlarge instance) and get all the way through to the end of the process. Cloud Builder says it is creating the site. It gets as far as creating the Load Balancer in AWS but can't create the instance. Here's the error I get: Execution Error ERROR 2016-03-16 02:07:09 Failed to create site 'ArcGISServerWindowsCB'. In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit http://aws.amazon.com/marketplace/pp?sku=3e6mr1zhg21t3385p1jiom88d (Service: AmazonEC2; Status Code: 401; Error Code: OptInRequired; Request ID: 55524436-926b-41f5-baf2-773067188242) The URL in the above error message just takes me to the ArcGIS Server AMIs page. I could go down this route but this is what Cloud Builder helps the user avoid doing. I successfully created an ArcGIS Server site on Ubuntu last month using Cloud Builder with no problems. Any ideas? Thanks
... View more
03-15-2016
06:19 PM
|
0
|
2
|
3821
|
Title | Kudos | Posted |
---|---|---|
1 | 01-27-2019 02:17 PM | |
2 | 04-03-2018 01:19 AM | |
1 | 07-02-2018 03:30 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|