Sankey Diagram: Handling Circularity Error

Sorry, I gave you the definition of a dirrected igraph Graph. Replace, please, G=nx.Graph(directed=True) by
G=nx.DiGraph(). When it is drawn you can see the directed edges (with attached arrows, pointing out the direction). If you cannot distinguish any cycle in the graph plot, then insert the following

print(list(nx.simple_cycles(G)))
print(nx.find_cycle(G))