Closed skyh24 closed 5 years ago
打印了msg, 发现是这个
{'MsgId': '1238061784517326141', 'FromUserName': '@e88ee4e2c048f6ff3d17759a1f687c30a7222a9741c4318f41bd72e4aa973807', 'ToUserName': '@864b489e4d03800239e982722d599b93', 'MsgType': 1, 'Content': '妙', 'Status': 3, 'ImgStatus': 1, 'CreateTime': 1560515390, 'VoiceLength': 0, 'PlayLength': 0, 'FileName': '', 'FileSize': '', 'MediaId': '', 'Url': '', 'AppMsgType': 0, 'StatusNotifyCode': 0, 'StatusNotifyUserName': '', 'RecommendInfo': {'UserName': '', 'NickName': '', 'QQNum': 0, 'Province': '', 'City': '', 'Content': '', 'Signature': '', 'Alias': '', 'Scene': 0, 'VerifyFlag': 0, 'AttrStatus': 0, 'Sex': 0, 'Ticket': '', 'OpCode': 0}, 'ForwardFlag': 0, 'AppInfo': {'AppID': '', 'Type': 0}, 'HasProductId': 0, 'Ticket': '', 'ImgHeight': 0, 'ImgWidth': 0, 'SubMsgType': 0, 'NewMsgId': 1238061784517326141, 'OriContent': '', 'EncryFileName': '', 'Type': 'Text', 'Text': '妙'} 'dict' object has no attribute 'fromUserName'
查一下你的 itchat 版本是不是最新的。
升级没问题了
readme 里明明就有说的。。
打印了msg, 发现是这个
{'MsgId': '1238061784517326141', 'FromUserName': '@e88ee4e2c048f6ff3d17759a1f687c30a7222a9741c4318f41bd72e4aa973807', 'ToUserName': '@864b489e4d03800239e982722d599b93', 'MsgType': 1, 'Content': '妙', 'Status': 3, 'ImgStatus': 1, 'CreateTime': 1560515390, 'VoiceLength': 0, 'PlayLength': 0, 'FileName': '', 'FileSize': '', 'MediaId': '', 'Url': '', 'AppMsgType': 0, 'StatusNotifyCode': 0, 'StatusNotifyUserName': '', 'RecommendInfo': {'UserName': '', 'NickName': '', 'QQNum': 0, 'Province': '', 'City': '', 'Content': '', 'Signature': '', 'Alias': '', 'Scene': 0, 'VerifyFlag': 0, 'AttrStatus': 0, 'Sex': 0, 'Ticket': '', 'OpCode': 0}, 'ForwardFlag': 0, 'AppInfo': {'AppID': '', 'Type': 0}, 'HasProductId': 0, 'Ticket': '', 'ImgHeight': 0, 'ImgWidth': 0, 'SubMsgType': 0, 'NewMsgId': 1238061784517326141, 'OriContent': '', 'EncryFileName': '', 'Type': 'Text', 'Text': '妙'} 'dict' object has no attribute 'fromUserName'