Troubleshooting sip assignHelper != NULL assertion

Scott Talbert swt at techie.net
Thu May 28 15:18:31 BST 2020


Hi,

I'm running into the following assertion in wxPython that I don't quite 
understand:

python3: ../../../../sip/siplib/siplib.c:3444: parseResult: Assertion 
`assign_helper != NULL' failed.

This is the relevant C++ class:

class wxPGWindowList
{
public:
     wxPGWindowList(wxWindow* primary, wxWindow* secondary = NULL)
         : m_primary(primary)
         , m_secondary(secondary)
     {
     }

     void SetSecondary(wxWindow* secondary) { m_secondary = secondary; }

     wxWindow* GetPrimary() const { return m_primary; }
     wxWindow* GetSecondary() const { return m_secondary; }

     wxWindow*   m_primary;
     wxWindow*   m_secondary;
};


The assertion occurs when trying to return an instance of wxPGWindowList 
in a Python method, e.g.:

def foo():
     return wxpg.PGWindowList(a, b)

>From what I can tell, there is no assignment helper assigned by sip 
because there is no default constructor?  I may be missing something, but 
I can't see why a default constructor would be needed.

Thanks,
Scott


More information about the PyQt mailing list