我收到Python 3
以下的错误
任何的想法?
clientDtSocket.send(bytes(fileName,"UTF-8"),("localhost",8101))
TypeError: an integer is required (got type tuple)
答案 0 :(得分:0)
尝试拨打clientDtSocket.sendto
而不是clientDtSocket.send
:
clientDtSocket.sendto(bytes(fileName,"UTF-8"),("localhost",8101))
有关这些方法的更多信息:https://docs.python.org/3/library/socket.html