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
SelectLayerByLocation_management gives ERROR 000368: Invalid input data?
The Make Feature Layer tool needs two parameter values, and you are only supplying one.
MakeFeatureLayer_management (in_features, out_layer, {where_clause}, {workspace}, {field_info})
Try replacing:
...
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
Debugging FeatureClassToFeatureClass giving ERROR 000732?
Try changing:
arcpy.env.workspace = "D:\Users\ShawnO\Desktop\PythonExercizes\Parcel_Ownership_update_model\Parcels.gdb"
inFeatures = "D:\Users\ShawnO\Desktop\PythonExercizes\...
4
votes
Accepted
Sublayers do not exist or are not supported in the geoprocessing tool?
As @MichaelMiles-Stimson has mentioned, you can get around this by removing the space in the group layer name.
However as you have mentioned that you have several MXDs and layers already set up, it ...
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
Accepted
Arcpy fail to loop between files in different directories
Are the feature classes in different directories? That is, your files are like:
r"C:\Mydirectory\Name1.shp"
r"C:\Mydirectory\Name2.shp"
r"C:\Anotherdirectory\Shapefile_To_Intersect.shp"
Instead of ...
3
votes
Accepted
Simple python query: properly setting up arcpy.env.workspace and defining datasets
You forgot to mention the extension.
If you are working with shapfiles in a workspace you always have to add the '.shp', such as here:
PmsNet = r'MARCHNET.shp'
You can work with the name alone only ...
3
votes
Accepted
How to reference all the shapefiles within a Windows folder and merge them in ModelBuilder?
So, it sounds like you just need a really simple Python script. The following should work, and I've included some options that you can un-comment to extend the functionality.
import arcpy, os, time
...
3
votes
Accepted
Should ArcGIS change the path of a gdb to the server data store when publishing a GP service?
So it turns out this is a known issue - NIM098733. It's fixed at 10.3 and there are no plans for porting back to earlier versions, so if, like me, you're on 10.2.1, you'll need to upgrade.
3
votes
Accepted
Raster multiplication script not executing
You're inputting your variables as string. Try without the quotes.
outRas = Raster(in_raster1) * Raster(in_raster2) * Raster(in_raster3)
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
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
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
error-000732 × 243arcpy × 220
arcmap × 25
spatial-analyst × 23
arcgis-desktop × 20
arcgis-pro × 18
modelbuilder × 15
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 × 9
clip × 9
merge × 9
table × 7
select-by-location × 7
arcgis-server × 6
layers × 6
arcgis-10.3 × 6
geoprocessing × 5
cursor × 5