You seem to be missing my point entirely. Without the *actual code*, not
your interpretation or paraphrasing of it, there is nothing that can be said.
Btw, your account above is completely inconsistent with the stack trace you
sent, which includes the line "g = load_graph(g_f)".
I'll repeat once more: Please remember to *always* provide a _minimal_ and
_self-contained_ example that shows the problem.
And as I said in the previous email, even from the incomplete information
you sent, it's pretty clear that you are calling the load_graph() function
with the wrong argument.