-1
我在Python 3
以下收到錯誤有什麼想法?需要整數(得到類型元組)錯誤
clientDtSocket.send(bytes(fileName,"UTF-8"),("localhost",8101))
TypeError: an integer is required (got type tuple)
我在Python 3
以下收到錯誤有什麼想法?需要整數(得到類型元組)錯誤
clientDtSocket.send(bytes(fileName,"UTF-8"),("localhost",8101))
TypeError: an integer is required (got type tuple)
嘗試調用的clientDtSocket.sendto
代替clientDtSocket.send
:
clientDtSocket.sendto(bytes(fileName,"UTF-8"),("localhost",8101))
有關這些方法的更多信息:https://docs.python.org/3/library/socket.html
請發表您的代碼;並非我們所有人都是精神病患者。 – Blair 2014-10-06 20:05:53
是不是'(「localhost」,8101)'元組?這是你的意圖嗎? – 2014-10-06 20:08:20
我也猜想這是一個問題,通過'(「本地主機」,8101)'''發送'方法。 – Jason 2014-10-06 20:08:45