Skip to content

web页面打不开 #147

@aks-ky

Description

@aks-ky

http://localhost:8080/ 显示 Failed to open a WebSocket connection. See server log for more information.

控制台提示 path 类型错误

ERROR - opening handshake failed
Traceback (most recent call last):
  File "C:\Users\xxx\.virtualenvs\WFHelper-13Ja4cvQ\lib\site-packages\websockets\asyncio\server.py", line 356, in conn_handler
    await connection.handshake(
  File "C:\Users\xxx\.virtualenvs\WFHelper-13Ja4cvQ\lib\site-packages\websockets\asyncio\server.py", line 207, in handshake
    raise self.protocol.handshake_exc
  File "C:\Users\xxx\.virtualenvs\WFHelper-13Ja4cvQ\lib\site-packages\websockets\asyncio\server.py", line 149, in handshake
    response = await response
  File "C:\Users\xxx\WFHelper\server\Server.py", line 143, in requestHandler
    name, ext = splitext(path)
  File "C:\Users\xxx\miniconda3\envs\wfhelper\lib\ntpath.py", line 204, in splitext
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not ServerConnection

log 出来的 path str 是 <websockets.asyncio.server.ServerConnection object at 0x00000191BB11D610>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions