I had the same. But figured out the root cause!!!!!
There are some good approaches in the other posts, but without knowing the root cause.
The root cause of mine was trying to copy a single cell... CAN YOU BELEIVE IT?
part of script was trying to clear a single row, and that damn cell was there.
i was trying to copy a single row and it suddenly crashes. restarted and continued copying cell by cell and figured out that an empty cell causes the crash. Deleted the column and all empty columns... then crossed through the heaven's gate!
now, can copy entire row, also script works fine!!!!!