hi, i had a problem with my use of swig, but it took me a long time to track down b/c of a misleading error message by swig. using C++ with python 2.5, swig version 1.3.35
The basic issue is that I had an overloaded function call "store_binding_state", which was wrapped using the following function in my _wrap.cc file generated by SWIG.
SWIGINTERN PyObject *_wrap_Bindings_Storage_Proxy_store_binding_state(PyObject *self, PyObject *args);
According to my (very basic) understanding of SWIG, this function both checks which version of the overloaded function to call, and checks the types of the parameters. I was passing in a python object with a bad type (it was expecting an enum type and i was giving it an int), but the error message I got was:
NotImplementedError: Wrong number of arguments for overloaded function 'Bindings_Storage_Proxy_store_binding_state'.
Possible C/C++ prototypes are:
[ output removed ]
my enhancement suggestion is that this error message could tell whether the problem was in fact the wrong number of arguments, or a bad type.
i know this is a pretty high-level description. let me know if more details would be helpful.
Log in to post a comment.