Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
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. -
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.
Related Rants
TypeError: connect () takes at least 4 arguments (4 given) Oh ok that makes sense...
undefined
python