-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
I am passing the correct number of arguments, however stilling hitting "takes 7 arguments, but got 5 arguments" #221
Comments
Just saw this from pyobjc [https://pyobjc.readthedocs.io/en/latest/core/vector-types.html] |
That seems very likely. I was going to ask if you could provide the full prototype of PyObjC and Rubicon use a slightly different approach to wrapping - PyObjC uses metadata provided by header files, whereas Rubicon doesn't; but we definitely don't have explicit support for If you're up for some debugging, the code in question is around lines 92-97 of |
Thanks @freakboy3742 ; sure, I will be happy to dig in on the weekend in this area. By the way, do we have a way to teach rubicon about the encoding of some of the arguments (or the full signature) ? |
There are ways to teach Rubicon about unknown types (see |
I also ran into problems with SIMD vector types in Objective-C methods a while back, and from what I remember the problems were the same as what PyObjC describes: To bypass rubicon-objc's automatic method signature parsing, you can use the lower-level For now, the only possible workaround would be to define a helper method in Objective-C that takes all arguments as regular integers/floats/structs and converts them to vector types before passing them to the real method. |
I am trying to invoke Objc from python; something which normally works for me. so I do the following: (
stageA
is an instance object)err = stageA.runWithInputTex_inputROI_inputMetadata_first_layout_output_outputROI_(inputTex, inputROI, metadatadict, first, layout, outTex, outputROI)
or:
err = demosaicStage.runWithInputTex( inputTex, inputROI=inputROI, inputMetadata=metadatadict, first=first, layout=layout, output=outTex, outputROI=outputROI)
In both cases, I am hitting the following error:
TypeError: Method b'runWithInputTex:inputROI:inputMetadata:first:layout:output:outputROI:' takes 7 arguments, but got 5 arguments
And I don’t get it; since I am literally passing 7 arguments. looks like rubicon correctly identifies that there should be 7 arguments, but somehow it ignores 2 that I am passing in.
I am also sure it is calling my code, since If I rename any of the arguments, I start getting a different error:
No method was found starting with...
Any thoughts how can I debug whats going on here?
The text was updated successfully, but these errors were encountered: