Skip to content

access DocumentAPI / Document in ScripterAPI / Sample #3

@aoloe

Description

@aoloe

when running

https://github.com/aoloe/cpp-pybind11-playground/blob/master/scripter-api/python/set-bar.py

print(Sample.a)
document = Sample.document
print(document.a)

i get this error message:

terminate called after throwing an instance of 'pybind11::error_already_set'
  what():  TypeError: Unable to convert function return value to a Python type! The signature was
        (self: scripterapi.Sample) -> ScripterAPI::Document

At:
  ../python/set-bar.py(7): <module>

the offending line is document = Sample.document.

the Sample and the Document classes for the API are defined here:

https://github.com/aoloe/cpp-pybind11-playground/tree/master/scripter-api/src/scripterAPI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions