flip selected line using python stand-alone window

Discussion created by Holly8639 on Nov 2, 2013
Latest reply on Mar 12, 2014 by dmccormick
I am trying to flip selected pipelines using stand-alone python window. Below are the steps I used:

   1). line join attributes from other tables (MakeFeatureLayer, AddJoin);
   2). select lines based on the joined attributes (SelectLayerByAttribute);
   3). remove joins (RemoveJoin);
   4). flip line on the selected lines (FlipLine_edit with or without MakeFeatureLayer after the selection).

It is shown the same error:

ERROR 999999: Error executing function.
Workspace or data source is read only.
Workspace or data source is read only.
Failed to execute (FlipLine).

Anyone has any solution?