Modelbuilder to Python Glitch?

Discussion created by tgullett on Feb 9, 2012
Latest reply on Aug 8, 2012 by Tomsriv
Working Environment:
SQL Server 2008
Windows Server Standard, SP 2
64-bit 16GB Ram Intel
AGS 10

The following model (see image) runs perfectly when executed from inside catalog:

However when exported to a python script and run as part of a scheduled task, the field names for the features appear corrupted. What could be causing this?

   # Import arcpy module
import arcpy

# Local variables:
streetnames = "C:\\scripts\\911ExportScript\\911Staging.mdb\\streetnames"
streets = "C:\\scripts\\911ExportScript\\911Staging.mdb\\streets"
streets_Layer = "streets_Layer"
streets_Layer__3_ = "streets_Layer"
streetsaddfields = "C:\\scripts\\911ExportScript\\911Staging.mdb\\streetsaddfields"

# Process: Make Feature Layer
arcpy.MakeFeatureLayer_management(streets, streets_Layer, "", "", "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;StreetID StreetID VISIBLE NONE;FullStreetName FullStreetName VISIBLE NONE;FrAddLeft FrAddLeft VISIBLE NONE;FrAddrRight FrAddrRight VISIBLE NONE;ToAddrLeft ToAddrLeft VISIBLE NONE;ToAddrRight ToAddrRight VISIBLE NONE;Rd_ID Rd_ID VISIBLE NONE;Shape_Length Shape_Length VISIBLE NONE")

# Process: Add Join
arcpy.AddJoin_management(streets_Layer, "StreetID", streetnames, "StreetID", "KEEP_ALL")

# Process: Copy Features
arcpy.CopyFeatures_management(streets_Layer__3_, streetsaddfields, "", "0", "0", "0")

Any ideas?