Error while creating a property map

MatijaB wrote

Ok, so I'm trying to use graph_tool inside a web project of mine.

Code (up to where it breaks):
g = Graph()
g.set_directed(False)

names = g.new_vertex_property("string")

Error:
ArgumentError: Python argument types in
graph_tool.libgraph_tool_core.new_vertex_property(unicode,
vertex_index_map, any)
did not match C++ signature:
new_vertex_property(std::string,
boost::vec_adj_list_vertex_id_map<boost::no_property, unsigned int>,
boost::any)

I run the code from a virtual environment, but when I run a test script
that only works with graph-tool inside the same environment, it works
perfectly. And when I run it inside my web project, with the same
dependencies and imports, it breaks with this error. Help please?

The problem seems to be that the string "string" is being passed as a
unicode object to the C++ side, which expects a regular string. However you
clearly defined it as a string... Maybe there is a Python 3 vs 2 mixup going
on? Are you sure both environments correspond to the same Python version?