1

当我尝试在 Windows 机器上运行我的 py 文件时出现以下错误,在 Mac 上一切正常,但我无法让两台机器相互通信。我必须在 ascii 中“转储”吗?如果是这样,我该怎么做?有什么建议么?谢谢!!

Traceback (most recent call last):
File "C:\Users\Keith\Desktop\rcserver\tcpserver_simpleReceive.py", line 23, in <module>
new_data = pickle.loads(data)
File "C:\Python27\lib\pickle.py", line 1382, in loads
return Unpickler(file).load()
File "C:\Python27\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 1165, in load_put
self.memo[self.readline()[:-1]] = self.stack[-1]
IndexError: list index out of range

垃圾场:

if e.type == pygame.JOYAXISMOTION:
    client_socket.sendall (pickle.dumps(e.dict,0))

这是负载:

 data = client_socket.recv(1024)
new_data = pickle.loads(data)
4

0 回答 0