Here is a minimal example :
from graph_tool.all import *
g=load_graph('test.xml')
_vertexIds = g.vertex_properties["_graphml_vertex_id"]
_edgeIds = g.edge_properties["_graphml_edge_id"]
test.xml:<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="
http://graphml.graphdrawing.org/xmlns" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<key id="o" for="node"
attr.name="origin" attr.type="double"/>
<key id="d" for="node"
attr.name="destination" attr.type="double"/>
<key id="w" for="edge"
attr.name="weight" attr.type="double"/>
<key id="n" for="edge"
attr.name="name" attr.type="int"/>
<graph id="G" edgedefault="directed">
<node id="65091">
<data key="o">0.0</data>
<data key="d">6.76759405264e-06</data>
</node>
<edge id="1" source="65091" target="65221">
<data key="w">192.49624317</data>
<data key="n">1</data>
</edge>
<node id="16071">
<data key="o">5.41539461304e-05</data>
<data key="d">2.03027821579e-05</data>
</node>
<edge id="2" source="16071" target="16081">
<data key="w">269.676249521</data>
<data key="n">2</data>
</edge>
<edge id="3" source="16071" target="16061">
<data key="w">299.894548773</data>
<data key="n">3</data>
</edge>
</graph>
</graphml>
The error message:Traceback (most recent call last):
File "test.py", line 4, in <module>
_edgeIds = g.edge_properties["_graphml_edge_id"]
File "/usr/lib/python2.7/site-packages/graph_tool/__init__.py", line 995, in __getitem__
val = self.get_func(self.g, key)
File "/usr/lib/python2.7/site-packages/graph_tool/__init__.py", line 1469, in <lambda>
lambda g, k: g.__properties[("e", k)],
KeyError: ('e', '_graphml_edge_id')