|
POST
|
Sorry but I do not. I requested a bug number a couple of times but got no response so I finally gave up. I'll give it another try and let you know if I get anything.
... View more
02-04-2020
03:06 AM
|
0
|
3
|
2594
|
|
POST
|
Thanks for the suggestion Dan. Yes, I had tried that but it got me to go back and look at the full name and did lead me to find the problem, which was my fault. I was specifying the "short name" ('FieldShareLevel) instead of the full name (ROW_Habitat.SDE.FieldShareLevel). It seems a bit severe to be crashing for such a mistake, but... once I fixed that it works as expected - at least when called from the Python pane in ArcPro. Thanks again for the help.
... View more
01-10-2020
02:33 PM
|
1
|
2
|
1501
|
|
POST
|
Nope - it crashes right away and leaves no trace as far as I can see. There is a .dmp file created but I'd rather not try to figure out how to view and interpret that.
... View more
01-10-2020
02:19 PM
|
0
|
0
|
1501
|
|
POST
|
ArcPro crashes every time I try to run the very trivial program below. I've tried it in the ArcPro python pane (both 2.4.2 and 2.4.3) and under Spyder IDE - and using many variations to the code below. It does throw an error (as expected) if I feed it a bogus table datasource. The table doesn't appear corrupt since I can open it from the catalog pane. Is anybody else using this API call? import arcpy arcpy.env.workspace = r'C:\Users\dmorri28\Documents\ArcGIS\Projects\MyProject\CC-SQL2k16-ERC-SDE.sde' arcpy.mp.Table('FieldShareLevel') I'm running this with arcpy that got installed with ArcPro (currently at 2.4.3 but also failed on 2.4.2) and Python 3.6.8 and Advanced license.
... View more
01-09-2020
12:54 PM
|
0
|
6
|
1603
|
|
POST
|
I'm going to close this out. I was able to get this to work by putting the full database path in a local property file imported by the python tool code - but the file had to be in the same directory structure as the python toolbox. Assuming the database is registered (mine wasn't) then the publish step will copy only the .SDE file up to the server.
... View more
12-16-2019
09:22 PM
|
0
|
0
|
686
|
|
POST
|
You nailed it! I created a new SDE and used that to create a new entry in Server Manager's list of registered data stored and now it works exactly as expected. My guess is that the one that was there used different authentication credentials - I don't see any way inspect it to verify this. This is quite a relief, now I can move on the the next problem Thanks a ton Joshua.
... View more
12-16-2019
08:23 AM
|
0
|
0
|
834
|
|
POST
|
I have a very simple python tool that returns results of a query on our enterprise geodatabase. When I publish that tool to our ArcGIS Server (not federated), the enterprise geodatabase gets copied to a file geodatabase, which is not what I want. I've read through the help on this many times and still can't figure out what I'm doing wrong. When I dump out the database path I can see the published code is accessing the file geodatabase copy instead of the SQL Server. I checked Server Manager and the database is listed as a registered Data Store, although it is not obvious how the literal string in my code gets matched to the name of the registered data store ("ROW_Habitat"). I'm running this with arcpy that got installed with ArcPro (currently at 2.4.2) and Python 3.6.8 and Advanced license. Here is the python tool: class SummaryStatsA(object): def __init__(self): self.label = "Summary StatsA" self.description = "" self.canRunInBackground = False def getParameterInfo(self): num_acres = arcpy.Parameter( displayName="Acres", name="num_acres", datatype="GPDouble", parameterType="Derived", direction="Output") num_orgs = arcpy.Parameter( displayName="Organizations", name="num_orgs", datatype="GPLong", parameterType="Derived", direction="Output") return [num_acres, num_orgs] def isLicensed(self): return True def updateParameters(self, parameters): return def updateMessages(self, parameters): return def execute(self, parameters, messages): db_table_path = r'C:\Users\dmorri28\Documents\ArcGIS\Projects\MyProject\CC-SQL2k16-ERC.sde\ROW_Habitat.sde.summary_stats_TEST' arcpy.AddMessage("DB Path: %s" % db_table_path) with arcpy.da.SearchCursor(db_table_path, ['num_acres', 'num_orgs'], None) as cursor: num_acres, num_orgs = cursor.next() parameters[0].value = num_acres parameters[1].value = num_orgs return Here is how I do the publish, which I run from the Spyder IDE: arcpy.CreateGPSDDraft(results, sddraft_file, service_name, server_type='FROM_CONNECTION_FILE', connection_file_path=AppInfo.ags_connect_connection_file, copy_data_to_server=False, folder_name=AppInfo.ags_service_folder, summary=service_summary, tags=service_tags, executionType='Synchronous', showMessages='Info', minInstances=0, maxInstances=2) arcpy.StageService_server(sddraft_file, sd_file) arcpy.UploadServiceDefinition_server(sd_file, AppInfo.ags_connect_connection_file)
... View more
12-16-2019
07:29 AM
|
0
|
2
|
875
|
|
POST
|
It turns out that Undo is not supported when editing a web layer - according to this help document. There is a suggestion here to add that support
... View more
12-16-2019
04:50 AM
|
0
|
0
|
630
|
|
POST
|
This is probably a different problem, but I just had a situation where I could not save updates to the Query widget configuration - all the other widgets were OK. Clicking the save button appeared to do nothing - but it did throw an error in the JavaScript console. In any case this was caused by a change to the schema of the underlying data source. I had to go into the web app JSON and update it to match and now I can save configuration changes. Perhaps this type of problem also affects other widgets too....
... View more
12-07-2019
04:38 PM
|
1
|
0
|
1583
|
|
POST
|
I have a python program does does a series of updates on a group of feature classes that it accesses via an ArcGIS online REST endpoint that proxies the request to my ArcGIS server. I want to be able to back out the updates if something goes wrong but I can't get it to work. I reduced the code as shown below. The code sets an initial value , performs 3 updates (each with a new cursor, since in my real code I have to make multiple passes over the data), then aborts the edit session. If I run this against a file geodatabase it works as expected where at the end the records have the "original value". However if I run it against the ArcGIS Online REST endpoint it ends up with the 2nd update ('Edited -2') - as if only the data updated by the last cursor was backed off. I'm running this with arcpy that got installed with ArcPro (currently at 2.4.2) and Python 3.6.8 and Advanced license. import arcpy workspace = 'https://utility.arcgis.com/usrsvcs/servers/383d3cf85e8a41e9b7e8a5e9e8bb90b9/rest/services/ROW_testing/ERC/FeatureServer' fc = workspace + '/0' # Set initial values with arcpy.da.UpdateCursor(fc, ['LineName']) as cursor: for row in cursor: cursor.updateRow(['Original value']) edit = arcpy.da.Editor(workspace) edit.startEditing(True, False) edit.startOperation() with arcpy.da.UpdateCursor(fc, ['LineName']) as cursor: for row in cursor: cursor.updateRow(['Edited - 1']) with arcpy.da.UpdateCursor(fc, ['LineName']) as cursor: for row in cursor: cursor.updateRow(['Edited - 2']) with arcpy.da.UpdateCursor(fc, ['LineName']) as cursor: for row in cursor: cursor.updateRow(['Edited - 3']) edit.abortOperation() edit.stopEditing(False)
... View more
12-05-2019
12:09 PM
|
0
|
1
|
709
|
|
POST
|
Thanks Duncan - and thanks for helping get it fixed in the documentation
... View more
11-19-2019
03:41 PM
|
1
|
4
|
6839
|
|
POST
|
I decided to take one more run at this and I think I figured it out. I looked inside that "result" object using dir(result) and discovered that there is a "resultID" function. When I called it I got this: '_PYTHON__RESULT__{C3F92556-2B2D-4A07-9B52-64C800DA9D70}' which looks suspiciously like what appears in the error message. So I changed my code to the following and the package request does now work. arcpy.PackageResult_management(result.resultID, out_file, convert_data='PRESERVE') The sample code in example #2 must be wrong: Package Result—Data Management toolbox | ArcGIS Desktop
... View more
11-18-2019
10:23 PM
|
2
|
2
|
6839
|
|
POST
|
Good news. I got this to work and it was evidently my fault... I removed all the attachments and re-uploaded them using the AGOL UI instead of however I attached them before. The AGOL feature layer is a proxy and sends all requests to a REST endpoint on our ArcGIS server which is where the database lives. I think I did the previous uploads on the ArcGIS server and must have done something wrong - the Python API could see them but was generating a bad URL to download them.
... View more
11-12-2019
04:08 PM
|
0
|
0
|
1224
|
|
POST
|
Good idea to try with a standard tool - I get the same error. I expect I'll have to contact ESRI on this. Also, thanks for the tip on being more specific on my environment. I've really struggled with APIs that work on one environment but are not available or don't work in the other. For the record I'm running this with arcpy that got installed with ArcPro (currently at 2.4.2) and Python 3.6.8 and Advanced license. import arcpy import os out_file = os.path.normpath('E:/ROW_as_habitat/temp/importgdb.gpkx') result = arcpy.analysis.Buffer(r"C:\Users\dmorrison\Documents\ArcGIS\Projects\MyProject\ROW Habitat (SDE).sde\ROW_Habitat.SDE.Centerline", r"C:\Users\dmorrison\Documents\ArcGIS\Projects\MyProject\ROW Habitat (SDE).sde\ROW_Habitat.SDE.Centerline_Buffer", "5 Meters", "FULL", "ROUND", "NONE", None, "PLANAR") arcpy.PackageResult_management(result, out_file, convert_data='PRESERVE') Parameters are not valid. ERROR 000800: The value is not a member of _PYTHON__RESULT__{BF60E0BB-6C4B-461B-993C-1BD7872E1460} | _PYTHON__RESULT__{AEB4812B-68DB-4385-8727-23395D87DD6F}. ERROR 000840: The value is not a File. Failed to execute (PackageResult)
... View more
11-12-2019
08:35 AM
|
1
|
1
|
6839
|
| 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
|