MahjongRepository / mahjong_soul_api

Python wrapper for the Mahjong Soul (Majsoul) Protobuf objects. It allows to use their API.
72 stars 10 forks source link

Try to login using email as username and password I got login error with error code 151 #7

Closed zhengye1 closed 2 years ago

zhengye1 commented 2 years ago

Try to use the API to generate some of the data from the tournament match (or call contest), but I got login error image

What can I do for that?

Nihisil commented 2 years ago

The issue is that MS requires you to change the client_version_string value after each new version release, otherwise they don't allow you to login with the old version (151 error code about that).

It wasn't convenient, so I updated example.py to choose a new version automatically based on the server config. It looks like it is working, but can be broken again later with future updates of MS. I will keep an eye on it.

Nihisil commented 2 years ago

Please check new released version https://pypi.org/project/ms-api/0.10.1/ and updated example.py and let me know if the issue was resolved

zhengye1 commented 2 years ago

That resolved. However I try to pull the record and I got 0 record found...

Nihisil commented 2 years ago

Do you have played games on your account? The script shows me:

2021-12-31 09:40:37 INFO: Connection was established
2021-12-31 09:40:37 INFO: Login with username and password
2021-12-31 09:40:37 INFO: Loading game logs
2021-12-31 09:40:39 INFO: Found 30 records
zhengye1 commented 2 years ago

I created a new account and just play one game...

Nihisil commented 2 years ago

With that I can't help, you need to investigate what is going on. This is a repository just for protobuf methods to interact with MS API. The example.py file is something where you can start, but deeper interaction with MS API is out of scope for this repository.

zhengye1 commented 2 years ago

OK, i try to dig out then, thank you