erase analysis Erase—Help | ArcGIS Desktop requires an advanced Arcmap license. In fact erase anything does. Check to see if the license is available to use, particularly if the license availability needs to be checked out in your environment. This is not an issue in standalone versions of arcmap, it is either advanced or it isn't. You may require to check out the licence.
check Accessing licenses and extensions in Python—Help | ArcGIS Desktop for a discussion