Opened 12 years ago
Closed 12 years ago
#5116 closed Bugs (fixed)
ImportError: dynamic module does not define init function (initscidbclientlibpy)
Reported by: | Owned by: | Dave Abrahams | |
---|---|---|---|
Milestone: | To Be Determined | Component: | python USE GITHUB |
Version: | Boost 1.40.0 | Severity: | Problem |
Keywords: | Cc: |
Description
bjam compiles and links the following c++ file, but when the module is imported into python the error message in the summary line of this ticket is reported.
class pyBase: public SciDBRemote { private:
public:
SciDBRemote py_SciDB; pyBase(int i) { int j = i; j++; py_SciDB = _sciDB; }; SciDB& getPySciDB() { return py_SciDB; }
};
BOOST_PYTHON_MODULE(SciDBRemotePy) {
class_<pyBase>("pyBase",init<int>())
.add_property( "py_SciDB", make_function(&pyBase::getPySciDB, return_value_policy<reference_existing_object>())) .def("disconnect", &pyBase::disconnect) .def("connect", &pyBase::disconnect) .def("executeQuery", &pyBase::executeQuery) .def_readwrite("_sciDB", &_sciDB) .def("getPySciDB", &pyBase::getPySciDB, return_value_policy<reference_existing_object>());
What does this python import error means with regards to the boost.python library, and what boost.python feature must be used to resolve it?
Thank you
Attachments (1)
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | Boost 1.45.0 → Boost 1.40.0 |
Thank you for your response.
I made this change and I can now load the module.
by , 8 years ago
Attachment: | VTKBlender.py added |
---|
Either it means that the module you're showing was improperly compiled into a shared library called "scidbclientlibpy.<some-extension>" rather than "SciDBRemotePy.<some-extension>," or the error has nothing at all to do with the code above and is related only to some other code that is used to build "scidbclientlibpy".