The first part is part of the python-igraph and it's alright. It's how the pathfinding is written.
The second part I have no idea why it's not working.
I have to find another computer to try this out . Probably something in my environment paths were used and haven't noticed.
Thanks for trying this out and sorry for your troubles.