Networkx Parse Gml Writing Unusable Gml Files
Solution 1:
This is a bug in NetworkX when generating nested attributes (edge graphics data in this case). An extra set of quotes was incorrectly added to the "Line" attribute.
The fix has been merged as part of this pull request: https://github.com/networkx/networkx/pull/981
Solution 2:
Pyparsing is not the smartest library when it comes to identifying when parsing errors occur. More recent versions of the library do support some better error identification, but they require some updates to the parsers to get this information.
Without seeing the parser, from your description, it sounds like the parser expects to see something like:
[
[
bunch of nodes...
]
[
optional bunch of edges...
]
]
What happens is that it successfully gets past the "bunch of nodes...", then finds some syntax problem in one of the edges in the "optional bunch of edges..." part. Since this is optional, things would still be valid if only there was a closing ']' after the nodes. That's why you get that pyparsing exception message. But the real problem is that one of the edges has a typo.
To diagnose this, try giving the parser just the first few edges. Then keep adding more and more edges until you get the pyparsing error - the most recently added edges contain the critical syntax error.
Post a Comment for "Networkx Parse Gml Writing Unusable Gml Files"