|
POST
|
I have a Argis Pro 3.3.2 Python toolbox tool that I use to publish a set of geoprocessing tasks to our 11.3 ArcGIS server. In the process of trying to debug a problem with the staging request added a call to arcpy.management.AnalyzeToolsForPro to see if it would help with the debugging (it didn't). When I ran it from the toobox, it took almost and hour to complete for each of the 2 tasks. When I run the exact same script standalone it takes about 2 minutes for each. What could explain this? In case it matters I'm running the toolbox in an essentially empty project. The other, perhaps more important mystery, is why the call to StageService_server works in the standalone script but fails when run in the toobox. You can see the results coming back from the CreateGPSDDraft call are different for some reason. Here is my trace from the standalone script 2024-10-24 13:20:28,850 - INFO - service_definition_gp - DEVOrgA: Analyzer output: E:/ROW_as_Habitat/sd_drafts\GeoImport_analyzer.txt 2024-10-24 13:22:32,991 - INFO - service_definition_gp - DEVOrgA: Running tool BeeAnalysis 2024-10-24 13:22:33,418 - INFO - service_definition_gp - DEVOrgA: Analyzer output: E:/ROW_as_Habitat/sd_drafts\BeeAnalysis_analyzer.txt 2024-10-24 13:24:42,385 - INFO - service_definition_gp - DEVOrgA: Creating SDDraft DEVOrgA_GpTools 2024-10-24 13:24:58,221 - INFO - service_definition_gp - DEVOrgA: CreateGPSDDraft Results {'errors': {}, 'warnings': {('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\consolidation', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\clean_and_validate_report.html', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\geo_import_report.html', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\Bee Habitat Report Template.rptx', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\consolidation', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\clean_and_validate_report.html', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\geo_import_report.html', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\Bee Habitat Report Template.rptx', 24032): [None]}, 'messages': {}} 2024-10-24 13:24:58,222 - INFO - service_definition_gp - DEVOrgA: Creating SD DEVOrgA_GpTools 2024-10-24 13:25:57,971 - INFO - service_definition_gp - DEVOrgA: Uploading SD DEVOrgA_GpTools Here is my trace when run from the toolbox in ArcGIS Pro 2024-10-24 14:45:28,025 - INFO - service_definition_gp - DEVOrgA: Analyzer output: E:/ROW_as_Habitat/sd_drafts\GeoImport_analyzer.txt 2024-10-24 15:36:07,186 - INFO - service_definition_gp - DEVOrgA: Running tool BeeAnalysis 2024-10-24 15:36:07,652 - INFO - service_definition_gp - DEVOrgA: Analyzer output: E:/ROW_as_Habitat/sd_drafts\BeeAnalysis_analyzer.txt 2024-10-24 16:25:11,704 - INFO - service_definition_gp - DEVOrgA: Creating SDDraft DEVOrgA_GpTools 2024-10-24 16:27:32,304 - INFO - service_definition_gp - DEVOrgA: CreateGPSDDraft Results {'errors': {('ERROR 001238: Script BeeAnalysis contains broken project data source: org_view', 68): [None], ('ERROR 001238: Script BeeAnalysis contains broken project data source: fqn', 68): [None], ('ERROR 001238: Script BeeAnalysis contains broken project data source: PollinatorScorecard', 68): [None], ('ERROR 001238: Script BeeAnalysis contains broken project data source: ManagementArea', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: org_view', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: fqn', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: PollinatorScorecard', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: ManagementArea', 68): [None]}, 'warnings': {('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\consolidation', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: org_view', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: fqn', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: PollinatorScorecard', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: ManagementArea', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\clean_and_validate_report.html', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\geo_import_report.html', 24032): [None], ('Data source used by Script BeeAnalysis is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\Bee Habitat Report Template.rptx', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\consolidation', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: org_view', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: fqn', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: PollinatorScorecard', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: ManagementArea', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\clean_and_validate_report.html', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\geo_import_report.html', 24032): [None], ('Data source used by Script GeoImport is not registered with the server and will be copied to the server: C:\\Git_Repository\\ROW_as_habitat\\row\\toolbox\\published\\Bee Habitat Report Template.rptx', 24032): [None]}, 'messages': {}} 2024-10-24 16:27:32,305 - DEBUG - service_definition_gp - DEVOrgA: CreateGPSDDraft Errors {('ERROR 001238: Script BeeAnalysis contains broken project data source: org_view', 68): [None], ('ERROR 001238: Script BeeAnalysis contains broken project data source: fqn', 68): [None], ('ERROR 001238: Script BeeAnalysis contains broken project data source: PollinatorScorecard', 68): [None], ('ERROR 001238: Script BeeAnalysis contains broken project data source: ManagementArea', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: org_view', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: fqn', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: PollinatorScorecard', 68): [None], ('ERROR 001238: Script GeoImport contains broken project data source: ManagementArea', 68): [None]} 2024-10-24 16:27:32,305 - INFO - service_definition_gp - DEVOrgA: Creating SD DEVOrgA_GpTools 2024-10-24 16:29:48,591 - ERROR - controller - DEVOrgA: ERROR 001272: Analyzer errors were encountered ([{"code":"00068","message":"Script BeeAnalysis contains broken project data source: org_view","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\BeeAnalysis"},{"code":"00068","message":"Script BeeAnalysis contains broken project data source: fqn","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\BeeAnalysis"},{"code":"00068","message":"Script BeeAnalysis contains broken project data source: PollinatorScorecard","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\BeeAnalysis"},{"code":"00068","message":"Script BeeAnalysis contains broken project data source: ManagementArea","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\BeeAnalysis"},{"code":"00068","message":"Script GeoImport contains broken project data source: org_view","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\GeoImport"},{"code":"00068","message":"Script GeoImport contains broken project data source: fqn","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\GeoImport"},{"code":"00068","message":"Script GeoImport contains broken project data source: PollinatorScorecard","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\GeoImport"},{"code":"00068","message":"Script GeoImport contains broken project data source: ManagementArea","object":"C:\\Users\\DMORRI~1\\AppData\\Local\\Temp\\ArcGISProTemp14340\\E486093E19C046E7B11A9A25973CAB2B.tbx\\GeoImport"}]). Failed to execute (StageService).
... View more
10-24-2024
03:32 PM
|
0
|
1
|
582
|
|
POST
|
According to ESRI support: Unfortunately, it does seem that accessing protected URLs directly via arcpy within a geoprocessing task is not feasible due to how the arcpy library handles security for such resources. Using REST APIs with a token-based authentication is a reliable alternative.
... View more
10-10-2024
01:52 PM
|
0
|
0
|
675
|
|
POST
|
Thanks for you suggestion @Wei_Ying . I'm working on a very back level ArcGIS Pro and Server so that might be part of the problem because I was unable to recreate the problem on the current level of software. That said, on the old software, when I look the REST service in Server Manager, "Uploads" is enabled. but when I look at the REST server JSON is appears not to be enabled. I hope to get my server updated in the next week or so, so maybe that will fix the problem {
"currentVersion": 10.61,
"cimVersion": "2.2.0",
"serviceDescription": "ROW geoprocessing tools.",
"tasks": [
"BeeAnalyis",
"BeeReport",
"Clean and Validate Organization Data",
"GeoImport"
],
"executionType": "esriExecutionTypeAsynchronous",
"resultMapServerName": "",
"maximumRecords": 1000
}
... View more
10-07-2024
08:08 AM
|
1
|
0
|
1034
|
|
POST
|
I made some progress on this in that I believe the problem is that that particular image service requires "subscriber" status which I think simply means the user has to be logged in so a token gets sent along with the request. When I log out of ArcGIS Pro and run the tool it fails that same way as when it is run on the server. I'm still at a loss as to how to do this login on the server where the geoprocessing task is running. I did add a call to SignInToPortal call but that did not fix the problem.
... View more
09-29-2024
09:25 PM
|
0
|
1
|
710
|
|
POST
|
Circling back on this problem which I figure out many months ago. If my memory doesn't fail me the parameter type must be 'GPFeatureRecordSetLayer' for this to work.
... View more
09-24-2024
03:47 PM
|
0
|
0
|
438
|
|
POST
|
I have a geoprocessing task that currently runs OK in a ArcGIS Online Web App Builder app. One of the input paramters (type=GPDataFIle) allows the user to upload a file, which then gets processed by the task. Now we are moving to ArcGIS Online Experience Builder so I create a Analysis widget and specify the task as a Custom Web Tool. We when I go to run the tool, that input parameter no longer appears to support file upload. Instead the I can only select an item form My Content, My favorites, ... Living Atlas, and ArcGIS Online. Is this a mistake? How or when can I do the file upload? Update: Even worse, it looks like the file type is limited to just PDFs, CSVs, and Word Documents. Other file types such as zipped shape files are not allowed
... View more
09-23-2024
01:46 PM
|
0
|
3
|
1142
|
|
POST
|
I've found that when I run a python toolbox tool as a geoprocessing task on our ArcGIS server (11.3.0), it fails when I try to access a public layer from the ESRI living atlas (https://landscape10.arcgis.com/arcgis/rest/services/USA_NLCD_Land_Cover/ImageServer) with this message: esriJobMessageTypeError: Traceback (most recent call last): File "<string>", line 58, in execute File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\__init__.py", line 1335, in Describe return gp.describe(value, data_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 384, in describe self._gp.Describe(*gp_fixargs(args, True))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: "https://landscape10.arcgis.com/arcgis/rest/services/USA_NLCD_Land_Cover/ImageServer" does not exist It doesn't appear to be a connectivity problem. I works when run from my client. Is there a server configuration option preventing this sort of connection? def execute(self, parameters, messages):
import requests
url = 'https://landscape10.arcgis.com/arcgis/rest/services/USA_NLCD_Land_Cover/ImageServer'
arcpy.AddMessage("Status code: " + str(requests.head(url).status_code)) # Prints 302 (redirect)
arcpy.Describe(url)
return
... View more
09-22-2024
09:06 AM
|
0
|
2
|
810
|
|
POST
|
I trying to develop a web tool from a notebook in ArcGIS Onine. I can access public features services OK but not secured services. Is there any way to make this work - including after I publish it as a web tool? I'll need it to run under authority of the user running the web tool, so I can't use a known username and password to log in. import arcpy
gis = GIS("home")
public_url = 'https://utility.arcgis.com/usrsvcs/servers/8bf6c4b09a3b4b2a8abadd08ac23e42b/rest/services/ROW/PublicData/FeatureServer/0'
private_url = 'https://utility.arcgis.com/usrsvcs/servers/de103079a25a422c9a92e26f35f4cf2d/rest/services/ROW/DEMO/FeatureServer/2'
arcpy.Describe(public_url) # Works
arcpy.Describe(private_url) #Fails "does not exist"
... View more
09-17-2024
11:09 AM
|
0
|
2
|
650
|
|
POST
|
I'm creating a python toolbox geoprocessing tool that will take a raster map layer as input (USA NLCD Land Cover), do some analysis on it, and generate a report - basically tabulating the acreage of the different land cover types (eg. open water, barren land, mixed forest...) for a given area. In the report I'd like to show the classification labels, but I can only see how to access the actual numeric pixel values (eg. 1,2,3, etc). I assumed I could get this throught the layer's symbology, but I'm not seeing it. How can I use arcpy to find the mapping from numeric classification to the text label, starting from a Layer object?
... View more
08-16-2024
06:42 AM
|
0
|
2
|
1041
|
|
POST
|
I know this is very old, but for the record, I started getting this error when I tried to import a python class that I created and placed in the same directory at the pyt file. from session_logger import SessionLogger I can import modules OK from that directory but evidently I can't import class files.
... View more
07-27-2024
04:27 PM
|
0
|
0
|
752
|
|
POST
|
After working with ESRI customer support we determined that this could be fixed by upgrading the ArcGIS Pro client and the ArcGIS Server to the latest releases (3.3 and 11.3)
... View more
07-19-2024
04:18 PM
|
0
|
0
|
792
|
|
POST
|
Thanks Christopher - good advice. How does one access the new map editor or determine if it is already available? I wasn't aware until recently of the ability to connect the popup to a smart form, so maybe that is it?
... View more
07-17-2024
08:49 PM
|
0
|
0
|
803
|
|
POST
|
We actually aren't using an app, just the map viewer - I think that was at attempt to simplify things but I'm not totally sure. I logged on and tried it with field maps and it does work as expected. But the users don't have logins so I'm not sure Field Maps is an option at least I couldn't figure out how to access it anonymously
... View more
07-16-2024
04:26 PM
|
0
|
2
|
850
|
|
POST
|
I created an ArcGIS Online web map with a form that allows a user to select a feature, then from the popup click "Edit" and update the feature using the form. The form works great. However, when I try it from a mobile device, the "Edit" option is not available in the popup. Is this working as designed? I really need the capability to edit from a mobile device - is there some other way to access the form? Thanks
... View more
07-16-2024
09:41 AM
|
0
|
4
|
888
|
|
POST
|
When I change the output parameter data type from GPFeatureLayer to GPLayer, the WAB widget starts allowing me to set the symbology and allows me to "Add result as operational layer" without "View result with a map service" which is progress and I think is what I want (I'm not sure of the pros and cons of viewing with a map service - do I need it?). However when I run it this way the widget completes with a message "The result is empty." There are no errors in the service log, and from the browser network trace I see this being returned from the server {jobId: "jd972954c64554cecaab51457add1b7df", jobStatus: "esriJobSucceeded",…}
inputs
:
{}
jobId
:
"jd972954c64554cecaab51457add1b7df"
jobStatus
:
"esriJobSucceeded"
messages
:
[,…]
0
:
{type: "esriJobMessageTypeInformative", description: "Start Time: Thursday, May 16, 2024 10:25:41 AM"}
description
:
"Start Time: Thursday, May 16, 2024 10:25:41 AM"
type
:
"esriJobMessageTypeInformative"
1
:
{type: "esriJobMessageTypeInformative", description: "Start Time: Thursday, May 16, 2024 10:25:41 AM"}
description
:
"Start Time: Thursday, May 16, 2024 10:25:41 AM"
type
:
"esriJobMessageTypeInformative"
2
:
{type: "esriJobMessageTypeInformative", description: "Running script States..."}
description
:
"Running script States..."
type
:
"esriJobMessageTypeInformative"
3
:
{type: "esriJobMessageTypeInformative", description: "Completed script States..."}
description
:
"Completed script States..."
type
:
"esriJobMessageTypeInformative"
4
:
{type: "esriJobMessageTypeInformative",…}
description
:
"Succeeded at Thursday, May 16, 2024 10:25:44 AM (Elapsed Time: 2.67 seconds)"
type
:
"esriJobMessageTypeInformative"
5
:
{type: "esriJobMessageTypeInformative",…}
description
:
"Succeeded at Thursday, May 16, 2024 10:25:44 AM (Elapsed Time: 2.68 seconds)"
type
:
"esriJobMessageTypeInformative"
results
:
{states: {paramUrl: "results/states"}}
... View more
05-16-2024
08:49 AM
|
0
|
1
|
909
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 08-11-2025 09:19 PM | |
| 2 | 08-07-2025 11:47 AM | |
| 1 | 01-18-2022 07:15 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|