-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
transport.get_extra_info("socket").getpeername() returns a socket with a raddr of (0,b'\x00\x00\x00\x00') ) #600
Comments
what command did you use ? |
got the same problem.
i just run it on the local ENV with command The following operation will cause an error:
Thanks for any help |
it's hard to tell without seeing any part of your code that triggers this error, thanks for writing a minimal example that causes the exception |
thanks for comment. In the past two hours, i try to find reason that cause the error,what is depressing that i didn't. |
i got the same problem: main.py app = FastAPI() @app.get('/') Related dependencies: click 7.1.2 Execute the following command in the command line: and Open the following address in the browser then i got the problem |
File "D:\code\websocker_fastapi_demo\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 291, in handle_upgrade
protocol.connection_made(self.transport)
File "D:\code\websocker_fastapi_demo\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 63, in connection_made
self.client = get_remote_addr(transport)
File "D:\code\websocker_fastapi_demo\venv\lib\site-packages\uvicorn\protocols\utils.py", line 9, in get_remote_addr
return (str(info[0]), int(info[1])) if isinstance(info, tuple) else None
ValueError: invalid literal for int() with base 10: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
and
INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)
INFO: None - "WebSocket /ws" [accepted]
---transport---: <_SelectorSocketTransport fd=780 read=idle write=<idle, bufsize=0>>
---info--- (0, b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
---info--isinstance- True
---transport---: <_SelectorSocketTransport fd=780 read=polling write=<idle, bufsize=0>>
---info--- (0, b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
---info--isinstance- True old win10
|
我也出现了这个问题,刚开始很正常,突然重新运行就出现的,并且还无法定位到我们编写的代码错误,直接定位到了内部文件报错。经过调试输出发现raddr都是00000所导致的转换报错,尝试重新安装也没用,同样把最新的代码放到另一台电脑上可以使用(并且同一个局域网) |
traceback:
ERROR: Exception in callback H11Protocol.connection_made(<_SelectorSoc...e, bufsize=0>>) handle: <Handle H11Protocol.connection_made(<_SelectorSoc...e, bufsize=0>>)> Traceback (most recent call last): File "D:\Work\env\Python37\lib\asyncio\events.py", line 88, in _run self._context.run(self._callback, *self._args) File "D:\Work\env\Daims_Fastapi\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 125, in connection_made self.client = get_remote_addr(transport) File "D:\Work\env\Daims_Fastapi\lib\site-packages\uvicorn\protocols\utils.py", line 20, in get_remote_addr return (str(info[0]), int(info[1])) ValueError: invalid literal for int() with base 10: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
The text was updated successfully, but these errors were encountered: