tornadoweb / tornado

Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
http://www.tornadoweb.org/
Apache License 2.0
21.62k stars 5.49k forks source link

TypeError: WebSocketHandler.init() missing 2 required positional arguments: 'application' and 'request' #3373

Open xiaochenJCC opened 2 months ago

xiaochenJCC commented 2 months ago

use source code, cause TypeError: WebSocketHandler.init() missing 2 required positional arguments: 'application' and 'request'. Try to remove file (web.py)'s code line super().__init__() in RequestHandler.init(), it runs ok. puzzled :(

bdarnell commented 1 month ago

It sounds like you may be inheriting from both WebSocketHandler and RequestHandler (perhaps indirectly). I've never tried that and I'm not sure if it would work or not. It might be sensitive to the order of your base classes.