Python Scripting for Map Automation Practice

741
3
07-17-2018 08:03 PM
JeremiahGbolagun1
New Contributor

>>> mxd = arcpy.mapping.MapDocument("CURRENT")
>>> df = arcpy.mapping.ListDataFrames(mxd, "City of Plains View")[0]
Runtime error

I am having problem running the above lines of code on ArcMap 10.5.1. Can you please let me where I have been having problem to run it.

Regards,

Jeremiah.

Tags (1)
0 Kudos
3 Replies
BenjaminMittler
Occasional Contributor III

Is your data frame called exactly "City of Plains View"?

JeremiahGbolagun1
New Contributor

Yes it is called City of Plains View.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

So to ask the obvious... was arcmap open with that project open?

Also check for a trailing or preceding space in the dataframe name if capitalization is correct