Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : expected LP_s instance instead of CallResult #68

Open
prashant-saxena opened this issue Jul 8, 2023 · 1 comment
Open

Error : expected LP_s instance instead of CallResult #68

prashant-saxena opened this issue Jul 8, 2023 · 1 comment

Comments

@prashant-saxena
Copy link

prashant-saxena commented Jul 8, 2023

Hello,
I am really glad that I have found this library and exactly at the time when I was about to develop something like this. Great work!!!!
Now here is situation:

instance = clib.MeshInstance()
data = clib.CleanUp(instance)

and the second line is producing this error:

c_library.py", line 493, in __call__
    res = self.func(*arg_list)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: expected LP_s instance instead of CallResult

CleanUp function needs C instance object not the python instance object or CallResult object. How do I solve this?

Prashant

@MatthieuDartiailh
Copy link
Owner

Whenever you call a function you get a CallResult object from which you can extract what you need. https://github.com/MatthieuDartiailh/pyclibrary/blob/main/pyclibrary/c_library.py#L526C4-L526C4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants