I'm running 10.4 and occasionally get an error when running scripts with the line;
mxd = arcpy.mapping.MapDocument("CURRENT")
CreateObject cannot open map document
Note "Always run in foreground" is checked and so is "Run python script in process"
When I try to run the same line of code in the ArcMap Python window, ArcMap crashes.
Anyone else having this issue?