Opened 12 years ago

Closed 12 years ago

#5116 closed Bugs (fixed)

ImportError: dynamic module does not define init function (initscidbclientlibpy)

Reported by: michael_fabbri@… 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)

VTKBlender.py (11.2 KB ) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Dave Abrahams, 12 years ago

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".

comment:2 by michael_fabbri@…, 12 years ago

Resolution: fixed
Status: newclosed
Version: Boost 1.45.0Boost 1.40.0

Thank you for your response.

I made this change and I can now load the module.

by anonymous, 8 years ago

Attachment: VTKBlender.py added
Note: See TracTickets for help on using tickets.