Using a Python module generated with Boost: did not match C++ signature -
i using software called mitsuba. comes along python implementation, wrapped boost. line in python:
scene = scenehandler.loadscene(fileresolver.resolve("model.xml"), parammap) yields error. type of fileresolver.resolve fs::path , type of parammap parametermap according documentation.
the function signature in c++ code is:
scenehandler::loadscene(const fs::path &filename, const parametermap ¶ms) the error is:
traceback (most recent call last): file "...\foo.py", line 22, in <module> scene = scenehandler.loadscene(fileresolver.resolve("model.xml"), parammap) argumenterror: python argument types in scenehandler.loadscene(str, stringmap) did not match c++ signature: loadscene(class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits>, class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct mitsuba::simplestringordering,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > >) what further investigations can make? know problem comes from?
unfortunately it's not clear of arguments causing problem.
according error message have, return type of fileresolver.resolve apparently str, not boost::filesystem::basic_path. want @ mitsuba defines boost.python interface see if there "converter" registered turning python strings boost::fs::path objects. if not, you'll have figure out right way of getting python object that's convertible correct type library.
for second argument, have same checks make, unless stringmap boost.python type (what type(parammap.__class__) return?). looks parametermap typedef for
`std::map<std::string, std::string, mitsuba::simplestringordering>` but again, there must boost.python converter registered can conversion python type.
Comments
Post a Comment