better error handling in GraphML parser; fixes a GraphML reading bug with the Python interface