boostorg / graph

Boost.org graph module
http://boost.org/libs/graph
325 stars 208 forks source link

read_graphml function rejecting well formed Graphml files #369

Open bhayat-quantinuum opened 8 months ago

bhayat-quantinuum commented 8 months ago

Here is a MWE of my code:

#include <iostream>
#include <fstream>
#include <boost/graph/graphml.hpp>
#include <boost/property_map/dynamic_property_map.hpp>

int main(int, char**){

    std::ifstream graph_file;
    graph_file.open("more_exampleHoles_8.txt", std::ifstream::in);

    Graph g;
    boost::dynamic_properties dp;
    boost::read_graphml(graph_file, g, dp);
}

The file more_exampleHoles_8.txt is attached below. I receive the following error:

terminate called after throwing an instance of 'boost::wrapexcept<boost::property_not_found>'
  what():  Property not found: betti.
Aborted (core dumped)

I think this is a bug? If not, any help appreciated.

more_exampleHoles_8.txt

jeremy-murphy commented 7 months ago

Do you have something else that reads GraphML to compare against? I mean, how did you verify that it's well formed?