-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: WebSocketHandler.init() missing 2 required positional arguments: 'application' and 'request' #3373
Comments
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. |
please fix it |
Fix what, exactly? There's not enough information here for me to tell what's going on. Can you provide a complete example of how you're using WebSocketHandler that demonstrates the problem? |
_init still i facing this issue, how to fix this issue? |
Again, there's not enough information in any of the three reports here for me to tell what's going on. You'll need to provide a complete example showing how you're using WebSocket to demonstrate the problem. |
here is the code which is facing the error I am using streamlit==1.35.0 and python 3.10.0 virtual environment. hope this is enough to fix the error. |
OK, so you're not using Tornado directly, but it's coming in through another package (probably streamlit)? You may have better luck on the streamlit issue tracker then; it may be specific to the way they're using WebSocketHandler. There's an open issue here: streamlit/streamlit#9140 I don't know anything about streamlit (and I can't use the code you provided because it needs a tensorflow model file to be present), so I'm not going to be much help in debugging but I did see one slightly unusual thing that I left as a comment on the streamlit issue: streamlit/streamlit#9140 (comment) |
use source code, cause
TypeError: WebSocketHandler.init() missing 2 required positional arguments: 'application' and 'request'
. Try to remove file (web.py)'s code linesuper().__init__()
in RequestHandler.init(), it runs ok. puzzled :(The text was updated successfully, but these errors were encountered: