Skip to main content
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 ...
AlecZ's user avatar
  • 2,653
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'...
Bera's user avatar
  • 77.9k
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 ...
KHibma's user avatar
  • 17k
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....
Dan's user avatar
  • 1,100
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 ...
Son of a Beach's user avatar
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\...
Alex Tereshenkov's user avatar
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 Con‌​tacts does not exist or is not supported Failed to execute (MakeFeatureLayer)...
Midavalo's user avatar
  • 29.9k
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 ...
ahmadhanb's user avatar
  • 41.4k
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}, {...
fatih_dur's user avatar
  • 5,013
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 ...
MacroZED's user avatar
  • 2,291
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")
Dan's user avatar
  • 1,100
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 ...
Bera's user avatar
  • 77.9k
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 ...
PolyGeo's user avatar
  • 65.4k
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\\...
artwork21's user avatar
  • 35.2k
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.
user2856's user avatar
  • 69.6k
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: ...
Bera's user avatar
  • 77.9k
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....
Alessio Arena's user avatar
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' ...
Bera's user avatar
  • 77.9k
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 ...
SMiller's user avatar
  • 3,726
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 ...
Son of a Beach's user avatar
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: ...
user2856's user avatar
  • 69.6k
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 ...
Anna Forrest's user avatar
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 ...
JasonInVegas's user avatar
  • 1,900
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 ...
Bera's user avatar
  • 77.9k
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'...
Fezter's user avatar
  • 22k
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 ...
KHibma's user avatar
  • 17k
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'...
Bera's user avatar
  • 77.9k
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, ...
jpmc26's user avatar
  • 1,719
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 ...
spaine's user avatar
  • 490
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()
PolyGeo's user avatar
  • 65.4k

Only top scored, non community-wiki answers of a minimum length are eligible