I'm creating a python script (for the first time in quite a long time). And the basics are confusing me a little. With the below code I keep getting the error:
"ERROR 000732: Input Table: Dataset /MARCHNET does not exist or is not supported Failed to execute (AddField)."
In the "OK" folder there is a shapefile named MARCHNET and it is also currently open in an instance in ArcMap.
-
1you should try: PmsNet = "MARCHNET.shp"ChrisL– ChrisL2016年02月24日 13:23:51 +00:00Commented Feb 24, 2016 at 13:23
1 Answer 1
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 if your workspace is a geodatabase, as feature classes in a geodatabase do not have file extensions.