You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all - I am trying to export an abstract base class, derive a class from it in python and create from a factory function. I get the following error: TypeError: pybind11::init(): construction failed: returned holder-wrapped instance is not an alias instance
Here is an example that recreates the problem:
Test.hpp
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all - I am trying to export an abstract base class, derive a class from it in python and create from a factory function. I get the following error:
TypeError: pybind11::init(): construction failed: returned holder-wrapped instance is not an alias instance
Here is an example that recreates the problem:
Test.hpp
Test.cpp
And finally in python: (inside a jupyter notebook)
Basically, how do I expose my Base class and obtain an object of a derived class from a C++ factory function?
Thanks for any help - I am really stuck.
Beta Was this translation helpful? Give feedback.
All reactions