1
我得到這個錯誤:Python的插座,屬性錯誤海峽有沒有屬性加密
AttributeError: 'str' object has no attribute 'encrypt'
運行這些代碼時。它們在函數的定義內(除了導入行)。順便說一句,從哪個庫是功能encrypt()
?
import socket
import sys
import getopt
import threading
import subprocess
buffer="lol"
client_sender(buffer.encrypt('utf-8'))
而client_sender函數的定義在這裏並不重要,它稍後將它的參數傳遞給發送它的套接字 –