PROBLEM
Users develop large models based on complex workflows and export them to scripts. In many cases, these scripts fail.
Scripts exported by ModelBuilder occasionally have problems with names and paths that cause scripts to fail. The known behaviors are as follows:
A. The model has variable names that are 'Reserved Words' in the scripting language.
B. Input data is specified by a layer name in the model, not its full path.
Code:
MyShapefile = "MyShapefile"
Get help from ArcGIS experts
Download the Esri Support App