POST
|
Hi Earl, Yes, it does succeed. In fact the purpose of this clone_items script is to create a backup of this particular map and associated feature layers. If I clone a map that was previously backed up a few weeks ago it succeeds. I have now made a few changes to my 'master copy' map and wish to back it up again. This is the map for which it fails. These two maps are therefore almost exactly the same. There has been minor updates made to the data (feature layers), one new feature layer added, and some small changes to things like pop-ups, etc. -Alan
... View more
03-28-2019
12:27 PM
|
0
|
0
|
81
|
POST
|
Hi Earl, Yes, I'm using a standalone installation. (No Pro). I was not using anaconda until yesterday when Dan suggested this, I was just using Python 3.7.1 and ensured I had the latest version of the API as I used "pip install arcgis upgrade" when I was first having issues. I am just cloning from one folder in ArcGIS Online (not Portal) to another, all within "My Content". Almost all of the services in the web map are ArcGIS Online Feature Layers. The only one that is different is I am pulling Stamen Base Map tiles using "Add Layers from Web". I'll just mention again that my script has worked doing this same task many times in the past. I even tried the same thing on a different map yesterday and it worked no problem. It is just this one map (or perhaps one of the features layers within it) that is giving the script trouble. Thanks, Alan
... View more
03-27-2019
09:44 AM
|
0
|
2
|
182
|
POST
|
Thanks for your help so far. I tried installing anaconda (tried both 32 bit and 64 bit) and installing the arcgis api as you suggested from the anaconda prompt. I then ran my script using the anaconda prompt but the line where I attempt to clone_items still gives me the same error. Interestingly it references a different feature layer now but still gives me the 'list index out of range error'. I should note that I do not currently have ArcGIS Pro installed.
... View more
03-26-2019
04:12 PM
|
0
|
1
|
182
|
POST
|
I'm not sure I understand. I just used pip install arcgis in order to get the API. Is this not the correct way to install? clone_items does work for me to clone different web maps, it just does not work for this one particular web map. In fact my guess is that there is one particular feature layer that seems to cause issues as it references this feature layer when giving the error 'list index out of range'.
... View more
03-26-2019
02:50 PM
|
0
|
3
|
182
|
POST
|
Hello, I am trying to use clone_items for ArcGIS API for Python. I am trying to clone a map to another AGOL folder which should copy the map and all dependent items to the specified folder. This works for other maps in my content but it is failing for the specific map I need to copy today. Does anyone know why this would be failing? I get the following error(s). Traceback (most recent call last): File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1913, in clone self._add_features(new_layers, relationships, layer_field_mapping, feature_service.properties['spatialReference']) File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1281, in _add_features object_id_mapping[layer_id] = {layer_features['attributes'][object_id_field] : add_results['objectId'] for i in range(0, len(layer_features))} File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1281, in <dictcomp> object_id_mapping[layer_id] = {layer_features['attributes'][object_id_field] : add_results['objectId'] for i in range(0, len(layer_features))} IndexError: list index out of range During handling of the above exception, another exception occurred: Traceback (most recent call last): File "r:\GIS_Warehouse\Production\Projects\CVRP\Scripts\promoteAGOL.py", line 107, in <module> main() File "r:\GIS_Warehouse\Production\Projects\CVRP\Scripts\promoteAGOL.py", line 92, in main successItems = ag.content.clone_items(cloneArray, folder=promoteFolder, search_existing_items=False) File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\gis\__init__.py", line 4034, in clone_items return deep_cloner.clone() File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 676, in clone results = executor.submit(self._clone, executor).result() File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\_base.py", line 432, in result return self.__get_result() File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\_base.py", line 384, in __get_result raise self._exception File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 663, in _clone raise ex File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "C:\Users\xxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\arcgis\_impl\common\_clone.py", line 1922, in clone raise _ItemCreateException("Failed to create {0} {1}: {2}".format(original_item['type'], original_item['title'], str(ex)), new_item) arcgis._impl.common._clone._ItemCreateException: ('Failed to create Feature Service xxx: list index out of range', <Item title:"xxx" type:Feature Layer Collection owner:xxx>)
... View more
03-26-2019
12:24 PM
|
0
|
12
|
1145
|
POST
|
The data I am using is from a personal geodatabases (.mdb). I am using the event layers (not the tables) as the inputs for the tool. The Route field type is text for all of the event layers i've tried this with. I've tried both but I usually have the POINT event layer as the 'Input Event Table'. I've tried outputting to a few different locations... When I try to save to a personal geodatabase (.mdb) i get a more specific error: 'ERROR 999999: Error Executing Function. The table was not found. [test] Failed to execute (OverlayRouteEvents)' When I try to save to a file geodatabase (.gdb) i get a similar error: 'ERROR 999999: Error executing function. The table was not found. The table was not found [test] The Microsoft Jet database engine cannot find the input table or query 'test'. Make sure it exists and that its name is spelled correctly. Failed to execute (OverlayRouteEvents)' When I try to save to a plain old directory, in this case 'C:\Test' I get a less helpful error message: 'ERROR 999999: Error executing function. Failed to execute (OverlayRouteEvents).' PS I just tried copying my source tables and the route reference to a file geodatabase (.gdb) and displaying the route events all over again. I made sure the workspace was set to the same file geodatabase and saved the output to the same location and I still get the same error.
... View more
07-31-2012
01:02 PM
|
0
|
0
|
49
|
POST
|
This may or may not help but I can show you the python code to accomplish this... #START OF CODE # Import system modules import arcpy from arcpy import env # Set environment settings - make this where your output will be going env.workspace = "C:/data" # Set local variables - make these whatever you need them to be inFeatures = "ca_counties.shp" valField = "NAME" # This is the field that must change to represent each of your fields # so instead of using this we will use fieldList[count] so that were using EVERY field name in the table outRaster = "c:/output/ca_counties" assignmentType = "MAXIMUM_AREA" priorityField = "MALES" cellSize = 0.5 fieldList = arcpy.ListFields(filename) #creates a list that contains all of the field names from the attribute table of 'filename' #change filename to the file you're using count = 0 while count < len(fieldList): ____arcpy.PolygonToRaster_conversion(inFeatures, fieldList[count], outRaster, assignmentType, priorityField, cellSize) ____#perform the conversion using every field name contained in fieldList ____count = count+1 #END OF CODE For some reason its not showing the indents so I had to put in underscores to represent the indents. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001200000030000000 This will give you specifics on what each parameter means for the PolygonToRaser_conversion tool PolygonToRaster_conversion (in_features, value_field, out_rasterdataset, {cell_assignment}, {priority_field}, {cellsize})
... View more
07-30-2012
11:26 AM
|
0
|
0
|
132
|
POST
|
Yes the tool is set up this way. The tool chooses the output type for you based on your inputs so that isn't the problem. Have you gotten the Overlay Route Events tool to successfully perform a UNION on POINT and LINE events layers?
... View more
07-30-2012
09:03 AM
|
0
|
0
|
49
|
POST
|
I'm trying to overlay a POINT event layer and a LINE event layer with a UNION. When I use the tool Overlay Route Events I get 'ERROR 999999: Error executing function." and "Failed to execute (OverlayRouteEvents)." The tool works fine when I choose INTERSECT but I want the UNION of these two event layers. Has anyone else encountered this problem? Can somebody please try this same operation and let me know if it works for you? Thanks, Al
... View more
07-27-2012
12:03 PM
|
0
|
5
|
2331
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|