POST
|
Hello people from the future, in my mirrored post in gis.stackexchange one of the users said: "I chatted with the Esri Geoprocessing Services Team -- they confirmed this is a bug and have entered a ticket into their system. I can't make any promises on their behalf, but they've set a target to fix in ArcGIS Pro 3.4" if that is true, I can't afford such delay, therefore I had to figure a solution: 1. In root level, I created a file called modules_importer.py: Updm2018
└── TestService.atbx
├ __init__.py
├ MyTestService.py
├ modules_importer.py
├ foo.py
└──bar
├ __init__.py
├ real_bar.py
├ file_required_by_baz.json
└─ baz.py 2. Inside the file I put the following code: import arcpy
import sys
from os.path import exists
def set_path():
bar_module = r".\bar"
if exists(arcpy.env.packageWorkspace + '\\..\\cd\\'):
sys.path.append(arcpy.env.packageWorkspace + '\\..\\cd\\') 3. Modified the imports of the file MyTestService.py: ...
import arcpy
import foo
arcpy.AddMessage("Loading own modules")
import modules_importer
modules_importer.set_path()
arcpy.AddMessage("AfterLoading own modules")
import bar.real_bar as real_bar
import bar.baz as baz
.... 4. When the stage definition is created, is very important to select the Copy all data option (in ArcGIS Pro): or its equivalent in python: setting True the property copyDataToServer in the GeoprocessingSharingDraft class. when all this is set, the creation of the .sd file will consolidate, and the file structure will be: │ manifest.xml
│ serviceconfiguration.json
│ tilingservice.xml
│
├───cd
│ ├───updm2018
│ │ foo.py
│ │ MyTestService.py
│ │ TestService.atbx
│ └───bar
│ real_bar.py
│ file_required_by_baz.json
│ baz.py
│
├───esriinfo
│ │ iteminfo.xml
│ │
│ └───metadata
│ metadata.xml
│
└───p30
MyTestService.msd
MyTestService.rltx
MyTestService.tbx and the file modules_importer.py will be consolidated as: # Esri start of added imports
import sys, os, arcpy
# Esri end of added imports
# Esri start of added variables
g_ESRI_variable_1 = os.path.join(arcpy.env.packageWorkspace,'..\\cd\\bar')
# Esri end of added variables
import arcpy
import sys
from os.path import exists
def set_path():
bar_module = g_ESRI_variable_1
# pythonModules = r".\\" # this line make a recursive call to the current folder
arcpy.AddMessage("Call set_path")
arcpy.AddMessage(arcpy.env.packageWorkspace + '\\..\\cd\\')
if exists(arcpy.env.packageWorkspace + '\\..\\cd\\'):
sys.path.append(arcpy.env.packageWorkspace + '\\..\\cd\\')
... View more
3 weeks ago
|
0
|
0
|
51
|
POST
|
In version ArcGIS Pro 2.9,3.0 and 3.1 the following structure of a web tool work as intended: Updm2018
└── TestService.atbx
├ __init__.py
├ MyTestService.py
├ foo.py
└──bar
├ __init__.py
├ real_bar.py
├ file_required_by_baz.json
└─ baz.py
The definition was staged using the StageService function and the .sd file will include the required files. Note: I also tried using the Save As Offline Service Definition tool: It is worth to mention that the file MyTestService.py include the imports: …
import foo
from bar import realbar
from bar import baz
… Execution of the tool StageService in ArcGIS Pro 3.3.1 generates an .sd file with the following structure (.sd file is just a zip file): │ manifest.xml
│ serviceconfiguration.json
│ tilingservice.xml
│
├───cd
│ └───updm2018
│ foo.py
│ MyTestService.py
│ TestService.atbx
│
├───esriinfo
│ │ iteminfo.xml
│ │
│ └───metadata
│ metadata.xml
│
└───p30
MyTestService.msd
MyTestService.rltx
MyTestService.tbx There are missing files required by the tool to properly run: real_bar.py file_required_by_baz.json baz.py The attached file contains the structure folder and Web Tool to reproduce the issue. Following the indications of the documentation , it should be possible to do it. As a matter of fact it has been working with out any issue, until this version.
... View more
3 weeks ago
|
0
|
1
|
109
|
POST
|
UPDM 2024? the latest version released is 2023: https://community.esri.com/t5/gas-and-pipeline-blog/utility-and-pipeline-data-model-2023-is-released/ba-p/1351728 could you check the source of your model?
... View more
07-08-2024
06:56 AM
|
0
|
0
|
83
|
POST
|
I am trying to create small application to list the portals configured in a machine/user. I initialize the Host object: ArcGIS.Core.Hosting.Host.Initialize(); then I try to use the singleton ArcGISPortalManager, but i keep getting a NullReferenceException How can i use that object without having to create an Add-in? neither here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Portal nor here: https://pro.arcgis.com/en/pro-app/3.1/sdk/api-reference/topic14684.html are restrictions or constrains about it.
... View more
04-16-2024
04:29 AM
|
0
|
1
|
287
|
POST
|
After checking the REST Service, the upload capability has been activated all the time. there is a nice little bug in ArcGIS Server: BUG-000126447 Uploads checkbox in Operation Allowed remains unchecked on Server Manager when the Uploads capability is enabled in a geoprocessing service.
... View more
02-29-2024
05:37 AM
|
0
|
0
|
493
|
POST
|
Hi @ChrisUnderwood when debugging several times prior to post my question, the line that sets the capabilities, always was hit. Cheers.
... View more
02-29-2024
05:35 AM
|
0
|
0
|
494
|
POST
|
Hi Alexander, my use case is to receive one (1) string with 9.220.000 characters as a GPString. Cheers
... View more
02-28-2024
02:27 AM
|
0
|
0
|
603
|
POST
|
It is intended to publish a geoprocessing tool to an standalone ArcGIS Server version 11, as it is required to enable the UPLOADS task in the service, and following the documentation: https://pro.arcgis.com/en/pro-app/3.1/arcpy/sharing/geoprocessingsharingdraft-class.htm the arcpy.sharing module is intended to be used in order to create the draft and then proceed to publish (as stated in the Code Sample in the documentation above This is the code used : server_type = "STANDALONE_SERVER"
service_type = "GP_SERVICE"
if ags_portal is not None and ags_portal != "":
server_type = "FEDERATED_SERVER"
service_type = "WEB_TOOL"
draft_creator = arcpy.sharing.CreateSharingDraft(server_type, service_type,name,result)
draft_creator.summary = "NIMA version: {0} {1}".format(release_version, dt.now().strftime("%Y%m%d%H%M"))
draft_creator.targetServer = ags_file
draft_creator.tags = "NIMA"
draft_creator.offline = False
draft_creator.offlineTarget = "11"
draft_creator.overwriteExistingService = True
draft_creator.copyDataToServer = False
draft_creator.executionType = "Asynchronous"
draft_creator.serverFolder = folder_name
if ags_portal is not None and ags_portal != "":
draft_creator.portalFolder = folder_name
draft_creator.maximumRecords = 1000
draft_creator.minInstances = 0
draft_creator.maxInstances = 2
draft_creator.maxUsageTime = 72000
draft_creator.maxWaitTime = 60,
draft_creator.maxIdleTime = 1
draft_creator.resultMapServer = False,
draft_creator.messageLevel = "Info",
if service_names[name][2]:
draft_creator.capabilities = "UPLOADS"
draft_creator.exportToSDDraft(sd_draft)
log.add("Created service definition draft file")
arcpy.server.StageService(sd_draft, sd)
log.add("Created service definition file from draft")
# Upload the service
arcpy.server.UploadServiceDefinition(sd, ags_file) When the process finish, the upload capability is not enable (please see attached image): According to the documentation: capabilities (Read and Write) The capabilities a service can support. The default value is None. UPLOADS—The client can upload related operations and resources. None—No capabilities need to be set. This is the default. it should be enough.
... View more
02-28-2024
01:43 AM
|
0
|
3
|
580
|
POST
|
Hello Alexander, as you state, and under my knowledge this string is about 9 Mb. taking into account your proposed solution I can state that I have a WebAdaptor configured in IIS 10, it allows by default 30Mb as maxAllowedContentLenght, that should enough for this use case. As I an using a POST call, the size of the limit on the query string should not affect. do you have any other suggestion? Thanks
... View more
02-28-2024
12:40 AM
|
0
|
2
|
614
|
POST
|
For me, the solution was provided by @TomDeWitte . He was very kind to e-mail me directly the zip file.
... View more
02-28-2024
12:31 AM
|
0
|
0
|
133
|
POST
|
There is a Geoprocessing tool that has been published in an ArcGIS server instance. this tool has several parameters defined as GPString. One of the parameters is intended to receive a collection of objects in WKT format. Doing some initial test the Geoprocessing service works with any issue. When the tool is exposed to real examples, it start receiving long strings, it means really loooong strings. For this case it is send an string with 9.220.000 characters approx. and the service answer is: When the log of the server is check, it indeed create the job and try to process it, but the Python code of the tool never receives the parameter (As can be seen in the 4th message - it should prints the parameter): I have trying to figure it, through the documentation, about the limit of the GP parameters, but so far, i have not found it. I found two possible solutions, it is to use the upload task of the GPService and pass the upload item id as a parameter, the other one is to use the SOAP endpoint (but SOAP endpoint are going to be deprecated.....so...better not to implement it) Does any one know this limitation? probably someone from inside ESRI? ( @SimonSuo @SimonSuo1 )
... View more
02-26-2024
12:22 AM
|
0
|
4
|
708
|
POST
|
Hello fellows, I have been reading about the support for .NET 6, and it will end on November 12th, 2024 as it states by Microsoft here. ArcGIS Pro runs under this framework, and my question is: what is the plan to migrate and release a version of ArcGIS Pro that runs under the next LTS framework (in this case the .NET 8)? For how long are we going to run an ArcGIS Pro that uses a not supported framework? If any of you guys have any news about it, please let me know. Kind Regards Cristian
... View more
01-17-2024
05:53 AM
|
0
|
2
|
1106
|
POST
|
I created an EMPTY instance of UPDM 2018 in a file Geodatabase, modify some structure of the data model (move some feature classes, create the LRS). using ArcGIS Pro 3.1.2 Then Export the schema to an xml document . I tested the xml document, importing it to a brand new file geodatabase, the import operation finished with any issue, then I proceed to check the FC's, the LRS, tables.....all is there. Then I proceeded to create an enterprise Geodatabase, and try to import the xml document, but the process failed: I tried to execute it in python, and receive the same error code, but with another message: I have tried changing the parameter from "Data and Schema" to "Only Schema" but the result is the same. What should I consider to make this work? Attached is the xml.
... View more
12-18-2023
08:25 AM
|
0
|
0
|
314
|
POST
|
Hi @JSchroeder Yes, I deployed in ArcGIS Online, I did it twice, one from my company computer, second time from my personal computer using different accounts connected to different ArcGIS Online. With different browsers.
... View more
12-01-2023
06:31 AM
|
0
|
1
|
495
|
Title | Kudos | Posted |
---|---|---|
2 | 12-01-2023 02:45 AM | |
1 | 07-19-2021 11:25 PM | |
1 | 07-21-2023 04:44 AM | |
1 | 07-07-2023 05:15 AM | |
1 | 01-19-2023 03:19 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|