AttributeError: 'NoneType' object has no attribute 'gold'
Closed this issue · 4 comments
Expected Behaviour
printing info
Current Behaviour
when i start example, it freezes with log INFO:root:Dota 2 GSI Server starting... and then nothing, after i press CTRL + C a few times it closes and says print(f'Gold: {server.game_state.player.gold}')
AttributeError: 'NoneType' object has no attribute 'gold'
Since March 11th, 2022, you need to add the following launch option to your dota2 -gamestateintegration
Learn more: https://store.steampowered.com/news/app/570/view/4491783379124370818
Also, could you provide more information about the system are you running? I was having the same issue while testing under Linux and MacOS.
Windows 11, and i use dota2rpc written in C++ u can check on git, so it didnt ask for launch option and works well
It looks like it was a problem with the documentation, the README.md
and example script had different tokens.
Also, the message "INFO:root:Dota 2 GSI Server starting... " is a bit misleading, at this moment dota2gsipy
is waiting for a DotA2 game to start
if token is the same, it will be stuck on starting... Restarting dota didnt help