Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错KeyError: 'fetchLastPrivacy' #32

Open
jhdonghj opened this issue Aug 14, 2021 · 6 comments
Open

报错KeyError: 'fetchLastPrivacy' #32

jhdonghj opened this issue Aug 14, 2021 · 6 comments

Comments

@jhdonghj
Copy link

jhdonghj commented Aug 14, 2021

在调用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
Copy link

Suphx commented Aug 14, 2021

参考文档: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,需要自己更新一下就能跑。

@lysokine
Copy link

lysokine commented Sep 8, 2021

参考文档: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,需要自己更新一下就能跑。

我自己爬了编译更新liqi.json,liqi.proto,liqi_pb2.py后main说找不到module liqi和proto了,复制原来0.8.1的文件回来就至少不报这个错,对着前后的文件看几乎都是一样的,百思不得其解

@Akegarasu
Copy link

你protobuf用的版本不对

@bailuWX
Copy link

bailuWX commented Dec 6, 2021

参考文档: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,需要自己更新一下就能跑。
严格安照简介的方式进行编译,替换之后报错,使用老的就没问题只不过无法正常运行

@nicognaW
Copy link

nicognaW commented May 15, 2022

你应该使用项目对应的protobuf版本转换你的proto文件,请参考 747929791/majsoul_wrapper#13 。这是因为protobuf不支持将新版本程序生成的文件应用在旧版本运行时上。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@bailuWX @Akegarasu @jhdonghj @Suphx @nicognaW @lysokine and others