|
POST
|
I'm getting an error *** AttributeError: 'list' object has no attribute 'to_dict' when I call arcgis.features.managers. AttachmentManager.download. I'm quite sure I have a valid attach manager object because I can list the attachments and add new attachments with no problem. I've tried all the combinations of input parameters I can think of with the same results, but no parameters as shown below should be valid. import arcgis.features tb_url = 'https://utility.arcgis.com/usrsvcs/servers/af1446382d3f441f859c305d15601085/rest/services/ROW_testing/UIC/FeatureServer/6' tb = arcgis.features.Table(tb_url, gis=None) att_mgr = tb.attachments att_mgr.download()
... View more
11-11-2019
10:37 PM
|
0
|
1
|
1261
|
|
POST
|
Thanks for the reply Duncan. It looks like this may have changed between ArcMap and ArcPro. My tool only runs on ArcPro so I'm stuck there. result.SaveToFile does not work on ArcPro (according to the documentation plus I just tried it to make sure) so that is not an option. The example from the ArcPro documentation looks pretty much the same as what I'm trying to do so I'm still searching for a solution.
... View more
11-11-2019
11:33 AM
|
0
|
1
|
6834
|
|
POST
|
I'm trying to do something that looks pretty simple, but isn't working for me. The code below is running a python tool then calling the API to package the tool. The tool runs great and I get the result object as expected/ But the package request fails with this error: *** arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid. ERROR 000800: The value is not a member of _PYTHON__RESULT__{44960780-1946-4AF7-B9FD-8AAD7585504E} | _PYTHON__RESULT__{61DCE3A6-3E2E-4AE6-8E7F-DEC9042BC235}. ERROR 000840: The value is not a File. Failed to execute (PackageResult). I've tried everything I can think of to isolate the cause - but no luck. Here is the code import arcpy import os arcpy.ImportToolbox(os.path.normpath('row_toolbox/SharedTools.pyt')) results = arcpy.sharedtools.ImportGeodatabase( 'UIC', os.path.normpath('E:/ROW_as_habitat/temp/ROWHWG_Database.gdb'), 'https://utility.arcgis.com/usrsvcs/servers/af1446382d3f441f859c305d15601085/rest/services/ROW_testing/UIC/FeatureServer', True) out_file = os.path.normpath('E:/ROW_as_habitat/temp/importgdb.gpkx') arcpy.PackageResult_management(results, out_file, convert_data='PRESERVE')
... View more
11-10-2019
05:57 AM
|
0
|
13
|
8215
|
|
POST
|
I have a python tool that we are moving from ArcMap to ArcPro. The tool accesses our enterprise database. In my python code I can reference the database using a string like 'Database Connections\\ROW Habitat (SDE).sde\\ROW_Habitat.SDE.Site'. When I do the publish ArcGIS is smart enough to figure out where the database really resides on the server (which I don't have access to) This doesn't work on ArcPro. There appears to be no equivalent to "Database Connections". I suspect that if I hard-code the absolute path to the sde file on my client, that the publish step would see that string and copy the sde file up to the server and figure it out from there. But we have a scheme where the absolute path is fed in from a properties file. This allows us to deploy the tool into multiple environments controlled by a local properties file. Any suggestions on how to get this type of publish to work on ArcPro?
... View more
11-01-2019
09:12 AM
|
0
|
1
|
761
|
|
POST
|
Based on forum activity, it looks like this is a very common error with many causes and essentially no clues logged as to what really caused it. By trial and error I was able to find the cause. This is the culprit: arcpy.env.workspace = arcpy.env.scratchWorkspace Once I removed it (it wasn't really needed as it turns out) the publish worked. It sure seems like ESRI could do a better job logging exactly what triggers errors like this. I spend untold hours trying to comply with the directions in the help page (none of which helped) and crawling through forums and documentation looking for a clue. The good news is that the fix was easy...
... View more
10-24-2019
05:09 PM
|
0
|
1
|
795
|
|
POST
|
I didn't have to change any code to get it to work for me (except the add new record does not work as advertised) so you shouldn't have to worry about the comments in the onOpen function. It was only a couple of weeks ago but I can't remember if I had to do any tricks to get it to work. Do you have at least one spatial layer in your feature service? I think I had to add a dummy spatial layer to get it to work. This is from the readme file: Note that at least one spatial layer is currently required to be added to your map via the LocalLayer widget for the map to load.
... View more
10-02-2019
04:29 PM
|
0
|
4
|
5167
|
|
POST
|
I have an SQL Server view that at I want to include in my ArcGIS server's REST endpoint as a table. I'm able to do it manually using ArcMap - it appears to create a query table when I drag the view onto the table of contents. How can I do this in python? Currently I go through this sequence Start with a blank mxd file: mxd_template_obj = arcpy.mapping.MapDocument(blank_template_fn) Get the dataframe: df = ListDataFrames(mxd_template_obj)[0] Create the query table (according to the documentation is creates a TableView): arcpy.MakeQueryTable_management(db_view, table_view_name, ....) Convert it to a TableView object: table_view = arcpy.mapping.TableView(table_view_name) Add it to the map: arcpy.mapping.AddTableView(df, table_view) Save the map: mxd_template_obj.saveACopy(<mxd_file_name>) It appears to generate a good mxd file - I can go into ArcMap and everything looks correct, but when I try to stage it for publishing I get this error: ExecuteError: ERROR 001272: Analyzer errors were encountered (codes = 33, 33) Standalone table's data source is not supported I suspect that my step 4 is wrong - once I have the query table I need to do something else to get it into the map correctly but I'm not sure what that is.
... View more
09-17-2019
10:54 AM
|
0
|
2
|
2424
|
|
POST
|
I'm looking for a widget exactly as this is describe. I downloaded it from git and installed it on my instance of WebAppBuilder and it looks good, except I can't get it to add a new record (which is the function that I really need the most). From the code it looks like maybe you hadn't gotten to this yet. I'm a complete novice on JavaScript - so I have high hopes that this will work out for me. Is there a newer version that supports add - or am I missing something with this 2.5 version? Thanks! var addFeature = esriRequest({
url: addUrl,
content: {
f: "json"
},
handleAs: "json",
content: {
adds: '[{"id":222,"adds":[],"updates":[],"deletes":[]}]',
f: "json"
}
}
... View more
09-14-2019
11:17 PM
|
0
|
3
|
5167
|
|
POST
|
I found that I could update the credentials by sending a JSON update request with just these parameters: url: https://rowhwg.erc.uic.edu/arcgis/rest/services/ROW/ERC_FW/FeatureServer
serviceUsername: xxxxx
servicePassword: yyyyy
id: 6f9366cdd59748adb6e30e251fab7afa
folderId: 04549141bb0f49d58b7f3fb50d5d71d5 It seems that if fails when certain other parameters are included (I didn't take the time to figure out which ones).
... View more
07-07-2019
09:39 AM
|
1
|
0
|
1282
|
|
POST
|
Well I came up with a very dirty solution on this that seems to work and I'll go with it until something more elegant comes up. I create my REST service names such that I can derive the desired key field values from them. Then I wrote an SOI that: intercepts all "applyEdit" REST requests Gets the service name it's running on behalf of (from the server environment "CfgName" property) and derives the desired key field value. For example if the service name is "COMPANYA_WIDGETS", the derived key value is "COMPANYA" Digs into the received json and sets the key field is being set to the desired value before passing it on to be processed by the server. I simply did a regular expression replacement like this: string pattern = "\"Org_ID\":\"[^\"]*\",";
operationInput = Regex.Replace(operationInput, pattern, "\"Org_ID\":\"" + orgID + "\",");
... View more
05-05-2019
04:01 PM
|
0
|
0
|
1549
|
|
POST
|
Thanks for the feedback Jimmy. I'm using the Enterprise SDK to develop the SOI - and that part seems to work well. The problem I have is programmatically installing the SOI on a service published via ArcPro. I took another look at the Enterprise SDK and it doesn't appear to provide any API to actually do the installation. I spent most of the day today rolling back my code to allow it to be published with Python2.7/ArcMap. That means going back to .lyr and mdx files (from .lyrx and .aprx). Now that I've done that and republished, I am able to install the SOI using the REST APIs. It is quite a mess doing some of the work in Python 2.7 (spawning off that work in subprocesses) and some in Python 3 but I guess I'll have to live with it until this bug is fixed.
... View more
05-05-2019
03:43 PM
|
0
|
3
|
3761
|
|
POST
|
Darren, what version of ArcPro and Python are you using? I'm on ArcPro 2.3.2 and Python arcgis 1.5.3 and still hitting this problem.
... View more
05-04-2019
04:32 PM
|
0
|
7
|
4955
|
|
POST
|
I'm on ArcPro 2.3.2 and hit the same problem. I can enable the SOI using the arcgis/admin/services/<Service_Name>.MapServer/edit REST API against a service published using ArcMap, but it fails when run against a service published with ArcPro python. All of my scripting is run on ArcPro/Python 3 so it really isn't an option to do the publish with ArcMap or anything with manual steps. ["'ObjIdSOI' is not a valid extension type for 'MapServer'."] Can somebody from ESRI please recheck the supposed fix to this and let us know what we need to do to get around this problem?
... View more
05-04-2019
04:27 PM
|
0
|
0
|
3761
|
|
POST
|
I have a feature class (SQL Server table) that contains data from multiple clients (organizations). I want to expose the data, but control access so an org can only view/update its own data. I've created a flow as shown below (this is done for each org) Create a layer file (.lyrx) with a query definition against the single table to pull out the org's data (the table has a key field - ORG_ID) Create a project (.aprx) based on the layer file and publish a REST endpoint on my ArcGIS server Create a feature service in ArcGIS Online based on the REST endpoint Share the feature service into an AGOL group where I have invited only members of the organization From that feature service I build web maps, web mapping apps, surveys etc and share them into the group also This all works very nicely and I've scripted it so it is easy to onboard new orgs. But I have one problem I can't solve. I need to make sure that the ORG_ID is not altered for existing records (I think I can accomplish this by hiding the field in the layer definition) and I need to make sure that the ORG_ID is correct on added records. I've looked into SOE's and DB triggers. The trouble there is there isn't enough context to know what the value is supposed to be. I tried many other approaches but nothing has worked completely. Any suggestions?
... View more
05-03-2019
06:34 AM
|
0
|
1
|
1646
|
|
POST
|
This has been logged as a bug. No word on when and if it will be fixed.
... View more
05-03-2019
05:50 AM
|
0
|
5
|
2593
|
| 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
|