ops.object.mode_set() not working on 2.78 When write ops.object.mode_set("EDIT") in console and press enter, it give me an error:


  Traceback (most recent call last):
    File "", line 1, in 
    File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\bpy\ops.py", line 187, in call
      ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
  TypeError: Calling operator "bpy.ops.object.mode_set" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_SCREEN')
You need to write mode= as shown here: bpy.ops.object.mode_set(mode='EDIT')