当前位置: 动力学知识库 > 问答 > 编程问答 >

python - exceptions.TypeError: 'NoneType' object has no attribute '__getitem__

问题描述:

I'm facing this problem and I will be grateful if you can help me.

userID=self.serverProxy.addUser(data, ROOM_IDS.MAIN_ROOM,self,(host,port))

print("%s",userID)

buf= ctypes.create_string_buffer(8)

header=(typeMsg<<28)|(ack<<27)|(res<<26)|(ack_num<<13)|(self.seq_num)

struct.pack_into('>LHH', buf,0,header,8,userID)

self.transport.write(buf.raw)

The error is the following:

exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'

分享给朋友:
您可能感兴趣的文章:
随机阅读: