ValvePython / dota2

🐸 Python package for interacting with Dota 2 Game Coordinator
http://dota2.readthedocs.io
198 stars 32 forks source link

create tournament lobby failed #52

Open mapleray opened 4 years ago

mapleray commented 4 years ago

Version: dota2==1.0.0 steam==1.0.1

Hi, I use create_tournament_lobby method to create a tournament lobby. But I get error message

dota.create_tournament_lobby(password=password,tournament_game_id=12345, tournament_id=12345, options=options) 

  File "/home/ubuntu/dota2/venv/lib/python3.7/site-packages/dota2/client.py", line 200, in send
    self._send(emsg, data, proto)
  File "/home/ubuntu/dota2/venv/lib/python3.7/site-packages/dota2/client.py", line 213, in _send
    proto_fill_from_dict(message, data)
  File "/home/ubuntu/dota2/venv/lib/python3.7/site-packages/steam/utils/proto.py", line 86, in proto_fill_from_dict
    desc = field_descs[key]
KeyError: 'tournament_game'

I look into the source code, find https://github.com/ValvePython/dota2/blob/master/dota2/features/lobby.py#L99 with a dictionary command. When I remove the key tournament_game with value True, still get error message: KeyError: 'tournament_game_id, guess some error with proto fields?

Update: Maybe key needs update.... I use create_practice_lobby and config_practice_lobby methods to bypass upon error. With config_practice_lobby, use key with leagueid, not tournament_game_id.

rossengeorgiev commented 4 years ago

Looks like a bug. Those changes came from PR, and looking at the history I don't think that method ever worked. Needs to be investigated

SpOOnySk commented 3 years ago

I want to ask .... leagueid that you are using in settings is the tournament ID you can find when you go to https://www.dota2.com/league/0/list ?

mapleray commented 3 years ago

I want to ask .... leagueid that you are using in settings is the tournament ID you can find when you go to https://www.dota2.com/league/0/list ?

yes

ImbaKrastavac commented 1 year ago

Can you tell me what value did you use when trying to host a league game for 'tournament_game_id' ?

Is there a way to get this ID before the game is hosted, so it can be passed down to the bot, so he can create a league game?