Modularity runtime error

Problem encountered while trying to evaluate modularity. The property was created by using the following instruction:

  color = g.new_vertex_property("string")

then it was populated using a function inside a for loop

  for v in g.vertices():
       ##some evaluation of variable c
       color[v]=c

The traceback and debug information are:

Traceback (most recent call last):
  File "plotter.py", line 56, in <module>
    plotimage(g,i, sys.argv[1]+".dot")
  File "plotter.py", line 38, in plotimage
    m = modularity(g, color)
  File "/usr/lib/python2.7/dist-packages/graph_tool/community/__init__.py", line 279, in modularity
    _prop("v", ug, prop))
RuntimeError: No static implementation was found for the desired routine. This is a graph_tool bug. :-( Please follow but report instructions at http://graph-tool.skewed.de. What follows is debug information.

Graph view: boost::UndirectedAdaptor<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, boost::no_property, boost::property<boost::edge_index_t, unsigned int, boost::no_property>, boost::no_property, boost::listS> >*

Action: boost::_bi::bind_t<void, graph_tool::get_modularity, boost::_bi::list4<boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::reference_wrapper<double> > >

Arg 1: graph_tool::ConstantPropertyMap<int, boost::detail::edge_desc_impl<boost::bidirectional_tag, unsigned int> >

Arg 2: boost::checked_vector_property_map<std::string, boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned int> >