I now guess I completely misunderstood your original message and perhaps even your two following messages.
I read "make it automatic so that all nodes of the graph are removed and per each removed node I will have" to mean:
Suppose you have a graph a<->b,b<->c,c<->a. Find all paths in that. Then remove node a leaving graph b<->c. Find all paths in that. Then remove node b leaving graph c. Find all paths in that. Then remove node c leaving the empty graph. Find all paths in that.
Thus I made it it automatic so that all nodes of the graph are removed, removing one more node more each time until none remained.
I tested that by making a small concrete example graph and it seemed to work.
I am now guessing you might mean:
Suppose you have a graph a<->b,b<->c,c<->a. Find all paths in that. Then remove node a leaving graph b<->c. Find all paths in that. Then start over with the original graph and remove node b leaving graph a<->c. Find all paths in that. Then start over with the original graph and remove node c leaving nodes a<->b. Find all paths in that.
Is that perhaps more correct? Or is that still perhaps in error in any way?
I apologize for my misunderstanding.
Today Horvát kindly showed that I incorrectly assumed my test was sufficient.
Again I apologize for not thinking more carefully about my code before posting.
For the error message you get, you know what graph you used which gave that error, but no one else knows what graph you used. Can you show exactly all the code you used that generated the graph you are using and the error you see?
If you use the small icon "<>" in the upper left corner of the Reply window it will let you paste your code into your message and will mostly leave that unchanged as code and not think it needs to reformat that and perhaps damage the code in the process.
It is sometimes difficult, after having worked on a problem for hours or days, to remember that the people who will read your message have not been watching your screen and listening to all the thoughts in your mind for those hours or days. Thinking "suppose the person reading this knows nothing more than what I explain to them in this message" can sometimes help.
Thank you