AttributeError: 'module' object has no attribute 'CreateFileGDB_Management'

Discussion created by sjmcarter on Jun 10, 2014
Latest reply on Jun 14, 2014 by Hornbydd
I keep getting this error, and don't understand why.  Here's my code:

# Import ArcPy site-package and os modules
import os
import sys
import arcpy

#Set variables
root_directory ="C:\\Users\\Me\\Documents\\ArcGIS\\Test2\\"
arcpy.env.workspace = root_directory

#Create Terminal clips gdb
terminal_db = "2014-05 Terminal Clips.gdb"
arcpy.CreateFileGDB_Management(root_directory, terminal_db)

I've tried removing the trailing "\\" from root_directory and also replacing the root_directory and terminal_db variables with the string literals, but still get the same results.

I googled the error, and it looks like it means that CreateFileGDB_Management doesn't exist.  People had the attribute error for other classes/functions and the problem was that it was spelled incorrectly or the capitalization was off.  However, I copied this directly from  I am using arcGIS 10.2, for the record.

What am I missing?