Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
The type error should really tell you more, like the args you passed versus the args the function requires. I've run into this before and thought WTF Python??
Maybe the args' order. Maybe some of them got the wrong class. Maybe the namespace is polluted and there are to entities with the same name.
This is my recipe for this kind of issue.
Disclaimer: Don't know any Python.
mhudson13614yIs one of them supposed to be 'self'?
alias1574yNope, this is just some crazy error I got from using some python module.
It's because you've supplied 4 arguments, but those arguments are not the arguments the function requires. So the connection function takes AT LEAST 4 arguments. You ended up passing 4 arguments, just not the ones required at minimum to call it. Again the TypeError is not helpful at all in showing you this.
You get this error when you have a method that takes 4 arguments positional (counting 'self' if it is an instance method), but also accepts optional named arguments. In your case, you called the method with fewer than the 4 leading args, but added some of the named args, enough to add back up to 4.