Error in as.igraph.vs(graph, vids) : Cannot use a vertex sequence from another graph.

I'm using a graph inside a for loop in each step I'm deleting specific nodes from a graph, then trying to assign the new graph to the old graph name, I got this message error: Error in as.igraph.vs(graph, vids) : Cannot use a vertex sequence from another graph. I have tried the induced.subgraph as an alternative for deleting but I'm getting the same error message, simply what I'm writing is the following:
GR<-delete.vertices(GR,c(2,3,4))
GR<-induced.subgraph(GR_new,c(2,3,4))