POST
|
I would first pare the subprocess code down to a single line if possible (ExcelToTable) and try to convert a trivial .xls file to see if that works as expected. If it fails then you are much more likely to get help from this forum or ESRI. If it doesn't fail then incrementally add in the complexities of your original script until it fails.
... View more
2 weeks ago
|
0
|
0
|
47
|
POST
|
This might also be useful https://community.esri.com/t5/python-questions/best-practices-document-for-setting-up-automated/m-p/1359651#M69390 I've found the it is best to run the scheduled program under a Single Use License
... View more
03-06-2024
11:59 AM
|
1
|
0
|
213
|
IDEA
|
I'm on ArcGIS Pro 2.9 and also am now seeing problems with the consolidator messing up my code. In my case it took a string "Organization" and replaced it with g_ESRI_variable_7 plus this g_ESRI_variable_7 = 'Organization..\\..\\GitRepos\\ROW_as_habitat\\row\\pro_project\\ROW as Habitat\\shared\\Organization' Now the toolbox that I published last night into our production environment is broken and I don't know how to fix it. Is there any way to tell the consolidator to leave a string alone? @KoryKramer I really need to figure out a way to get around this ASAP. BTW, I saw another case yesterday where a string was botched by the consolidator but republishing fixed it. UPDATE 30 minutes later: I republished and this latest problem went away. However I have about 10 tools that I often publish so if this is some sort of random problem then it's going to be very costly to have to thoroughly test the tools after every publish just to make sure my strings didn't get corrupted.
... View more
03-04-2024
05:29 AM
|
0
|
0
|
82
|
IDEA
|
@ATFerguson , sorry but the only way I've been able to do this is updating the Web Map JSON specification. The parsing isn't too bad once you convert the JSON to a python dict, but still a bit messy.
... View more
02-28-2024
04:13 PM
|
0
|
0
|
42
|
POST
|
Now I see where I was going wrong. I mistakenly thought the URL needed to point to a REST service, but it needs to point to a file, as shown in your image. And this makes sense since the parameter type is DEFile. Opps. Thanks so much Alexander helping me figure this out.
... View more
02-26-2024
04:34 PM
|
0
|
0
|
101
|
POST
|
Hi Alexander - thanks for responding. But I don't quite follow your suggestion. The file upload works perfectly. But when I click URL, enter a URL, then Submit, I can't figure out how to get that URL string in my script. Instead of the URL, I get the string "c:\arcgisserver\directories\arcgisjobs\row_dev\devorga_gptools_gpserver\j1b86d313ca9243ef9318a28bcba24ef0\scratch\1'. I can certainly create a new algorithm in the Python file as you suggest but I'm not sure what it is supposed to do. Can you please clarify? Thanks
... View more
02-24-2024
06:35 PM
|
0
|
0
|
122
|
POST
|
I have a Python toolkit tool with a DEFile parameter type and I publish it as a geoprocessing service. Then I created a Web Application Builder geoprocessing widget to access it from ArcGIS Online. You can see in the image below how it gets rendered in the widget. When I select "Upload File", it works as expected allowing the user to select a local file which then gets uploaded to the ArcGIS Server. But I don't understand how to make the URL selection work. I can see in the network trace that the URL does indeed get sent into the REST service, but by the time it reaches my python code it looks like this: c:\arcgisserver\directories\arcgisjobs\row_dev\devorga_gptools_gpserver\j1b86d313ca9243ef9318a28bcba24ef0\scratch\1 There is no file by that name on the server. The only thing I can think of is that my parameter type is wrong but I can't figure you what it should be. Any ideas? In reality I would be OK without URL functionality but I can't remove it from the widget UI, so as long as it is there I'd like to have it work correctly.
... View more
01-28-2024
10:16 AM
|
0
|
4
|
294
|
IDEA
|
Here is a rough outline of the steps I went through. The input is a mpxk file and I end up with a hosted feature layer . I'm not sure this is really what you want to do since you are working with image layers and my goal was to get the features published, but in any case here it is Use ExtractPackage to unpack the mpkx file Find the .mapx file in the unpacked files Create a new empty ArcGISProject Use ArcGISProject.importDocument to import the map into the project Use map.listLayer to iterate through the map layers and use map.removeLayer to remove all but Feature Layers and Group Layers (layer.isFeatureLayer and layer.isGroupLayer) Call map.getWebLayerSharingDraft("HOSTING_SERVER", "FEATURE", rest_id) to get a sharing_draft document Set the sharing_draft attributes (summary, service_name, tags, etc) Call sharing_draft.exportToSDDraft to get a sharing draft file Call arcpy.StageService specifying the sharing draft file Call UploadServiceDefinition to create the hosted feature layer
... View more
01-25-2024
06:02 PM
|
0
|
0
|
299
|
POST
|
I just ran into this with a geoprocessing service running on ArcGIS Server 10.6.1 running JSONToFeatures
... View more
01-16-2024
04:04 PM
|
0
|
0
|
271
|
POST
|
Hi Chris. I would add "print" message after every relevant line to make sure your assignments are resulting in the strings that you expect. I've never used propy.bat but I assume it is something you run from the DOS command line, so those print statement should show up in the DOS window. If the path looks correct then you coud try to do a DOS "dir <path>" so see if the server can access it. db99_sde = os.path.join(data_path,"db99.sde")
print ("db99_sde: " + db99_sde)
... View more
01-10-2024
03:57 PM
|
0
|
0
|
345
|
POST
|
I'm trying to create a Geoprocessing REST service that takes a map layer as input and does some processing on the records within the layer. When I create the ArcGIS Online Web Application Builder Geoprocessing widget I check "Select layer from map" for the layer input parameter (parameter type is GPLayer, I've also tried GPFeatureLayer). So far so good. On the widget input form I can select a layer from the map and run the service, but server rejects it with a "ERROR 000840: The value is not a Layer" message. Any ideas on how to make this work?
... View more
01-08-2024
11:19 AM
|
0
|
0
|
170
|
POST
|
I would try to dump out the value of 'db99_sde' to see what it is really set to. Are you publishing this code as a geoprocessing tool, or just copying it to the server? If you are doing a publish then that process (consolidation) can can alter source code statements that contain file paths (eg. unc_path = r'\\abc.local\AdminData\GIS')
... View more
12-25-2023
02:45 PM
|
0
|
2
|
404
|
POST
|
When I run code from the Task Scheduler, I run it on a machine with a ArcGIS Pro "single use license". Give that a try to see if it helps.
... View more
12-23-2023
11:05 AM
|
0
|
0
|
190
|
POST
|
I haven't worked with publishing geoprocessing tools in a while but I'm quite sure that selection lists are baked in at publishing time. Essentially I think the code in UpdateParameters is never called when run from the web. Here is a similar post
... View more
12-17-2023
02:56 PM
|
0
|
0
|
154
|
Title | Kudos | Posted |
---|---|---|
1 | 03-06-2024 11:59 AM | |
1 | 12-11-2023 03:20 PM | |
2 | 11-17-2023 06:52 AM | |
1 | 10-12-2023 07:38 AM | |
1 | 10-01-2023 04:02 PM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|