what is a traceback?
I'm not a real programmer - just a GIS guy thrown into the possibilities of python. A lot of my script had to be fixed by a real python guy but he stopped when he said that the errors that are ESRI based are out of his "scope".
If you mean the error messages it looks like this now:
"
Executing: batchMap4PMV
Start Time: Thu Jul 31 13:38:22 2014
Running script batchMap4PMV...
checking out inset map placement: None
no inset map
beginning layer filter of data frameLayers
CROWN_LANDS_FILE = '2411100'
Tantalis Files
defined the lyr for Tantalis Files?
ERROR 000358: Invalid expression
Failed to execute (SelectLayerByAttribute).
Traceback (most recent call last):
File "W:\srm\sry\Local\projlib\2014-15\Auth_Lands_PMV\data\scripts\batchMapRobot.py", line 80, in <module>
runMapRobotScript(filenum, outfile)
File "W:\srm\sry\Local\projlib\2014-15\Auth_Lands_PMV\data\scripts\batchMapRobot.py", line 42, in runMapRobotScript
obj.dataFrameFilter(obj.mainDF, obj.mainDefQry, inset_map)
File "W:\srm\sry\Local\projlib\2014-15\Auth_Lands_PMV\data\scripts\map_robot_2014_PMV_v2_4batch.py", line 161, in dataFrameFilter
arcpy.SelectLayerByAttribute_management(lyr,"NEW_SELECTION", defQry)
File "e:\sw_nt\arcgis\desktop10.1\arcpy\arcpy\management.py", line 6498, in SelectLayerByAttribute
raise e
ExecuteError: ERROR 000358: Invalid expression
Failed to execute (SelectLayerByAttribute).
Failed to execute (batchMap4PMV).
Failed at Thu Jul 31 13:38:29 2014 (Elapsed Time: 7.00 seconds)
"
Oh and I've tried the quotes around the field names. It works OK without the quotes in the ArcMap interactive world.