相关疑难解决方法(0)

Python错误:io.UnsupportedOperation:fileno

我正在使用此链接中的服务器和客户端程序:http://www.bogotobogo.com/python/python_network_programming_tcp_server_client_chat_server_chat_client_select.php

当我运行客户端时遇到以下错误:

Traceback (most recent call last):
  File "client.py", line 26, in client
    read_sockets, write_sockets, error_sockets =     select.select(socket_list , [], [])
io.UnsupportedOperation: fileno
Run Code Online (Sandbox Code Playgroud)

我正在使用Python 3,但我已经使用print来改变所有行Python 2 to 3.

这是代码:

while 1:
        socket_list = [sys.stdin, s]
        # Get the list sockets which are readable
        read_sockets, write_sockets, error_sockets = select.select(socket_list , [], [])
Run Code Online (Sandbox Code Playgroud)

python sockets

16
推荐指数
1
解决办法
2万
查看次数

标签 统计

python ×1

sockets ×1