#925 misleading python error msg with overloaded fns

closed-duplicate
python (259)
5
2011-02-06
2008-05-31
No

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.

Discussion

  • William Fulton

    William Fulton - 2011-02-06
    • assigned_to: nobody --> wsfulton
    • status: open --> closed-duplicate
     
  • William Fulton

    William Fulton - 2011-02-06

    Duplicate of 3027355 which was fixed in swig-2.0.1

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks