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
It appears there are declaration order problems in the generated code. It could be related to the version of pybind11 I used (2.2.0) or compiler version (msvc2015). But these errors can be fixed with a few simple changes.
There were 3 lines which gave an error while importing the python module: ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
It is referring to Player in the default paramter but it has not been registered yet. This one I fixed by naming the PlayerInterface wrapper definition and moving up above the BulletInterface:
It appears there are declaration order problems in the generated code. It could be related to the version of pybind11 I used (2.2.0) or compiler version (msvc2015). But these errors can be fixed with a few simple changes.
There were 3 lines which gave an error while importing the python module:
ImportError: arg(): could not convert default argument into a Python object (type not registered yet?). Compile in debug mode for more information.
It is referring to
Player
in the default paramter but it has not been registered yet. This one I fixed by naming the PlayerInterface wrapper definition and moving up above the BulletInterface:The next 2 problems are in the UnitInterface wrapper. The default parameters cast
nullptr
toUnit
, butUnit
has not been registered yet.These I fixed by naming the class again, changing the first 2 lines to:
After making these changes, I was able to import the python module without errors.
The text was updated successfully, but these errors were encountered: