747929791 / majsoul_wrapper

自动化雀魂AI的SDK,实时解析雀魂对局信息,并模拟鼠标动作出牌
MIT License
394 stars 61 forks source link

报错KeyError: 'fetchLastPrivacy' #8

Open jhdonghj opened 3 years ago

jhdonghj commented 3 years ago

https://github.com/747929791/MajsoulAI 的AI运行majsoul_wrapper的时候会报KeyError: 'fetchLastPrivacy'

具体信息如下:

(venv) D:\MajsoulAI-master>python main.py
waiting to calibrate the browser location
  Number of good matches: 642
  Homography Matrix: [[ 6.48872443e-01 -1.81677678e-04  6.75356641e+02]
 [ 5.29145342e-04  6.48279953e-01  2.50010905e+02]
 [ 5.38194002e-07 -1.41332255e-07  1.00000000e+00]]
Similarity: 0.9973840146991272
create AI subprocess locally
starting up on 127.0.0.1 port 7479
waiting for the AI
AI connection:  <class 'socket.socket'> <socket.socket fd=1628, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 7479), raddr=('127.0.0.1', 60383)> ('127.0.0.1', 60383)
waiting for the game to start
Traceback (most recent call last):
  File "main.py", line 744, in <module>
    MainLoop(level=level)
  File "main.py", line 705, in MainLoop
    while not aiWrapper.isPlaying():
  File "main.py", line 107, in isPlaying
    result = liqiProto.parse(flow_msg)
  File "D:\MajsoulAI-master\majsoul_wrapper\liqi.py", line 84, in parse
    proto_domain = self.jsonProto['nested'][lq]['nested'][service]['methods'][rpc]
KeyError: 'fetchLastPrivacy'
Suphx commented 3 years ago

参考文档:https://github.com/747929791/majsoul_wrapper#%E9%80%9A%E4%BF%A1%E6%A0%BC%E5%BC%8Fliqi-proto

”目前项目中./proto已同步0.8.1.w版本的liqi proto,如有更新可按如下方式同步新proto:“...

现在liqi proto的版本好像是0.9.1,需要自己更新一下就能跑。