Boost logo

Boost Users :

From: John Reid (j.reid_at_[hidden])
Date: 2007-10-30 06:14:24


Hi,

When I try to read a graphml file an exception is thrown but cannot be
passed back to python through boost.python as no converter is registered.

I'm using SVN version 338 from
https://svn.osl.iu.edu/svn/projects_viz/bgl-python.

The output is:
c:\dev\python\boost\graph\__init__.py in read_graphml(filename)
     624 """
     625 try:
--> 626 graph = Digraph.read_graphml(filename)
     627 except UndirectedGraphError:
     628 graph = Graph.read_graphml(filename)

<type 'exceptions.TypeError'>: No to_python (by-value) converter found
for C++ type: struct boost::graph_exception

If I just try the following:
bgl.Graph.read_graphml(filename)

I get something that might be a different symptom of the same problem:
<type 'exceptions.SystemError'>: 'finally' pops bad exception

The graphml file is:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created by yFiles 2.4.2.2 -->
<graphml xmlns="http://graphml.graphdrawing.org/xmlns/graphml"
xmlns:y="http://www.yworks.com/xml/graphml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns/graphml
http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd">
   <key id="d0" for="node" yfiles.type="nodegraphics"/>
   <key id="d1" for="edge" yfiles.type="edgegraphics"/>
   <graph id="G" edgedefault="directed">
     <node id="n0">
       <data key="d0" >
         <y:ShapeNode >
           <y:Geometry x="0.0" y="0.0" width="30.0" height="30.0"/>
           <y:Fill color="#FFCC00" transparent="false"/>
           <y:BorderStyle type="line" width="1.0" color="#000000" />
           <y:NodeLabel x="13.0" y="13.0" width="4.0" height="4.0"
visible="true" alignment="center" fontFamily="Dialog" fontSize="13"
fontStyle="plain" textColor="#000000" hasBackgroundColor="false"
hasLineColor="false" modelName="internal" modelPosition="c"
autoSizePolicy="content"></y:NodeLabel>
           <y:Shape type="ellipse"/>
         </y:ShapeNode>
       </data>
     </node>
     <node id="n1">
       <data key="d0" >
         <y:ShapeNode >
           <y:Geometry x="18.0" y="68.0" width="30.0" height="30.0"/>
           <y:Fill color="#FFCC00" transparent="false"/>
           <y:BorderStyle type="line" width="1.0" color="#000000" />
           <y:NodeLabel x="13.0" y="13.0" width="4.0" height="4.0"
visible="true" alignment="center" fontFamily="Dialog" fontSize="13"
fontStyle="plain" textColor="#000000" hasBackgroundColor="false"
hasLineColor="false" modelName="internal" modelPosition="c"
autoSizePolicy="content"></y:NodeLabel>
           <y:Shape type="rectangle"/>
         </y:ShapeNode>
       </data>
     </node>
     <edge id="e0" source="n0" target="n1">
       <data key="d1" >
         <y:PolyLineEdge >
           <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
           <y:LineStyle type="line" width="1.0" color="#000000" />
           <y:Arrows source="none" target="standard"/>
           <y:BendStyle smoothed="false"/>
         </y:PolyLineEdge>
       </data>
     </edge>
   </graph>
</graphml>

Thanks for a great library,
John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net