0

I am new to python programming. When function Vigra.learning.RandomForest.Writehdf5 is called in the python code, it gives a error as below:

self.RF.writeHDF5(fileName, pathInFile, overwriteFlag)
Boost.Python.ArgumentError: Python argument types in
RandomForest.writeHDF5(RandomForest, str, str, bool)
did not match C++ signature:
writeHDF5(class vigra::RandomForest<unsigned int,struct vigra::ClassificationTag>,          class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >   filename, class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > pathInFile='')

I have installed python extension package vigranumpy aswell as boost python but I have not installed vigra (c++ image processing lib ) . I am not able to trace the reason for the error.

Thanks in advance

bmargulies
  • 97,814
  • 39
  • 186
  • 310
user2287258
  • 31
  • 1
  • 3

1 Answers1

0

The Boost.Python error indicates that the caller is trying to use a C++ signature of RandomForest.writeHDF5(str, str, bool) but the exported C++ function expects RandomForest.writeHDF5(str, str). I am not sure what behavior the overwriteFlag is intended to do, but changing:

self.RF.writeHDF5(fileName, pathInFile, overwriteFlag)

to

self.RF.writeHDF5(fileName, pathInFile)

should resolve the Boost.Python.ArgumentError exception.

Tanner Sansbury
  • 51,153
  • 9
  • 112
  • 169