8
votes
Accepted
Imposing New Projection on Multiple Shapefiles using ArcPy?
You just need to include the root path with the shapefile "file" name. os.walk returns the root and then either the directory or file for every element in each folder - meaning that for each file ...
6
votes
Accepted
Creating selection in stand-alone ArcPy script?
You cant create a feature layer on disk, it is stored in memory only.
Change:
sortedftr = 'C:/Users/srcha/Desktop/Cluster_Analysis/output/Ld_Play_extra_sort_ftr.shp'
To:
sortedftr = 'sortedftr_lyr'...
5
votes
Accepted
Running models outside of ArcGIS Pro
Your model has a lot of what looks to be LAYER input parameters. Meaning the input to the tools have come from the ToC inside Pro. When you run the model outside of Pro (ie. using python at command ...
5
votes
Accepted
ERROR 000732 - Dataset * does not exist or is not supported Failed to execute (CopyFeatures)
You were almost there...you need to select the layer from the map document and then use that as the source for the CopyFeatures. e.g.
# Export Layer Data
arcpy.mapping.MapDocument(r"P:\ \ \*2021....
5
votes
Accepted
Looping in folders subfolders not working using Arcpy
Your fc variable's value is the name of the file (shapefile), but does not include the path to the file, so the system does not know where the feature class is. This may be fine for feature classes ...
4
votes
Accepted
Referencing Enterprise Geodatabase feature classes from ArcPy with ArcGIS Pro
It seems as you cannot use this shortcut any longer. When the Database Connections special folder is dragged into the Python window in ArcMap, you get:
r'C:\Users\%username%\AppData\Roaming\ESRI\...
4
votes
Accepted
Input unsupported or doesn't exist in MakeFeatureLayer()
To expand on @GetSpatial's comment, if your Contacts is a Table and not a Feature Class, you will get the 000732 error Contacts does not exist or is not supported Failed to execute (MakeFeatureLayer)...
4
votes
Accepted
ERROR 000732: Output Location: Dataset results does not exist or is not supported?
Your workspace is missing the r before the path or you can replace one backslash \ with two backslashes \\ or you can replace the backslash \ with a forward slash /. You can adjust your code based on ...
3
votes
Arcpy.mapping Select by Location problem
If you look at the arguments of arcpy.SelectLayerByLocation_management, which is
SelectLayerByLocation_management (in_layer, {overlap_type}, {select_features}, {search_distance}, {selection_type}, {...
3
votes
Problem with layer name
You have not set the LayerName correctly.
At the moment, LayerName is only the name of the dataset. Its it not the full path to the dataset.
You need to identify the actual layer object when using ...
3
votes
Exporting NDVI as .TIF using ArcPy?
This should be the correct syntax:
NDVI_1.save("C:/Users/KJanus/Desktop/Intro_ArcGIS/RasterData_Lab6/NDVI.tif")
3
votes
Accepted
ArcGIS10.5.1 Data Merge error: 000732
Use ListFeatureClasses with a wildcard:
Lists the feature classes in the workspace, limited by name, feature
type, and optional feature dataset
You dont need to worry about other files since ...
3
votes
Copying shapefile then making feature layer using ArcPy gives ERROR 000732?
To do this I would use Copy instead of CopyFeatures because it:
Makes a copy of the input data.
The code that you presented does not have enough detail to be certain what went wrong with it but a ...
3
votes
Raster calculator ERROR000732, python scripter
The path slashes are being interpreted as escape characters, use one of the following path slash formats instead:
raster1 = "C:/Users/Elisa/...
raster1 = r"C:\Users\Elisa\...
raster1 = "C:\\Users\\...
3
votes
Accepted
Error in reprojecting raster from WGS 84 to GDA 94
You seem to be using the Project tool which is for vector data. You need to use the Project Raster tool which is for rasters.
3
votes
Exporting to Excel gives ERROR 000732?
Try adding r to the path:
arcpy.env.workspace =r"C:\Users\pierrej\Desktop\GIS Data"
or the backslashes may be interpreted as escape characters.
Correct syntax for Table to Excel is:
...
3
votes
Importing from CSV and changing projection using ArcPy?
I guess Michael Stimson is suggesting to do something like:
for x in filestoo:
if x.endswith('shp'):
# Determine the new output feature class path and name
outfc = os....
3
votes
Accepted
Rotating polygons by value from attribute table using ArcPy?
Create a function to rotate points then use the da.UpdateCursor to update the geometry for each polygon. Code below will modify your data so backup before you try it:
import arcpy, math
fc = 'aPoly' ...
3
votes
Accepted
If statement not moving to else: when false?
Try moving line 7
rasy=arcpy.sa.Raster(os.path.join(workspace2, trial))
into the if statement.
It looks like this is being called on a non-existent .tif and will fail, causing the script to error ...
3
votes
Checking to see if database is there and delete if so using ArcPy?
Your script is a bit inconsistent in how it refers to the fGDB. Sometimes by full path, sometimes just using the database name alone.
To avoid this inconsistency, as well as to avoid errors due to ...
3
votes
Accepted
Using ArcPy to Generate Near Table in memory
You need to get rid of the directory as well as the file extension.
import os
import arcpy
import pandas as pd
filein = [
r'D:\mypath\test1.shp',
r'D:\mypath\test2.shp',
]
for f in filein:
...
3
votes
Accepted
Spatial join features from different geodatabases
As per @Vince's comment, you need to fully qualify the paths to your feature classes by prepending the appropriate path the to file geodatabase they come from.
For example, by using a list ...
3
votes
Accepted
Using RasterCalculator in ArcGIS Pro ModelBuilder gives ERROR 000539
What is happening is that the Raster Calculator is trying to subtract one complete raster from another. It believes you have supplied a new raster named "%Value%" which evaluates to a raster ...
3
votes
Raster division using ArcPy
When you do:
arcpy.env.workspace = r"C:\Users\giser\Desktop\test1"
raster_list1 = arcpy.ListRasters("*")
arcpy.env.workspace = r"C:\Users\giser\Desktop\test2"
No rasters ...
3
votes
ERROR 000732 - Dataset * does not exist or is not supported Failed to execute (CopyFeatures)
Running code in the python console often has different behaviour than running it as a standalone script. When you're using the console, you're running it in the context of the ArcMap session that you'...
3
votes
"ERROR 000732: Input Features Does Not Exist Or Is Not Supported" when attempting MakeFeatureLayer
This is the relevant code to your error:
groundWaterFC = "KY_WaterWells_Springs"
arcpy.MakeFeatureLayer_management(groundWaterFC, "groundWaterFeatureLayer")
If you are inside ...
2
votes
Accepted
arcpy.MakeFeatureLayer_management for Feature Class within Feature Dataset with gdb
Avoid naming folders .gdb
When i run this code i get a feature Count (two features in land_lyr):
import arcpy
arcpy.env.workspace = r'C:\TEST.gdb'
arcpy.MakeFeatureLayer_management(in_features=r'...
2
votes
Adding query layer to MXD in ArcPy
There's no need to save an intermediate layer file and then load it.
MakeQueryLayer_management returns a "result" object:
r = arcpy.MakeQueryLayer_management (input_db_name, outLayer, query, ...
2
votes
Accepted
Appending Feature Class From File Geodatabase to SQL Server Express Geodatabase?
The answer is that the Database Server connection to a SDE database using SQLexpress is not appropriate for editing data, only for administering it (i.e. permissions, etc.) You must connect to the ...
2
votes
RuntimeError: ERROR 000732: Input Raster: Dataset ___ does not exist or is not supported
Your path names are invalid.
In place of:
env.workspace = "C:\Users\srchang\Desktop\outputshp"
try using:
env.workspace = r"C:\Users\srchang\Desktop\outputshp"
and do the same for outTimes.save()
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error-000732 × 246arcpy × 221
arcmap × 26
spatial-analyst × 23
arcgis-desktop × 20
arcgis-pro × 19
modelbuilder × 16
arcgis-10.1 × 14
arcgis-10.0 × 13
arcgis-10.2 × 13
symbology × 12
raster × 11
raster-calculator × 11
file-geodatabase × 11
shapefile × 10
enterprise-geodatabase × 10
clip × 9
merge × 9
layers × 7
table × 7
arcgis-server × 6
arcgis-10.3 × 6
select-by-location × 6
geoprocessing × 5
cursor × 5