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

Start error with the dota client #15

Closed
Philaeux opened this issue Nov 28, 2016 · 4 comments
Closed

Start error with the dota client #15

Philaeux opened this issue Nov 28, 2016 · 4 comments
Labels

Comments

@Philaeux
Copy link
Contributor

Recently, i got this issue with a fresh build from the repo:

Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/gevent/greenlet.py", line 534, in run
    result = self._run(*self.args, **self.kwargs)
   File "/dazzar/bot/dota_bot.py", line 62, in start_dota
     self.dota.launch()
   File "/usr/local/lib/python3.4/dist-packages/dota2/client.py", line 245, in launch
     self.steam.games_played(self.steam.current_games_played + [self.app_id])
   File "/usr/local/lib/python3.4/dist-packages/steam/client/builtins/user.py", line 128, in games_played
     'games_played': map(lambda app_id: {'game_id': app_id}, app_ids)
   File "/usr/local/lib/python3.4/dist-packages/steam/client/__init__.py", line 257, in send
     proto_fill_from_dict(message.body, body_params)
   File "/usr/local/lib/python3.4/dist-packages/steam/util/__init__.py", line 99, in proto_fill_from_dict
     repr(key), type(val)
TypeError: Expected 'games_played' to be of type list, got <class 'map'>

I'm doint a simple client.connect(...) client.login(...) and dota.launch(...), every of each when the previous part fire ready.

@rossengeorgiev
Copy link
Contributor

Oh I see. This is a bug in steam actually.

@Philaeux
Copy link
Contributor Author

Philaeux commented Nov 28, 2016

This is kind of strange, sometimes I get it (in my huge project), sometimes I don't (in a fresh test). But If you find a bug with my report, it is good xD

@rossengeorgiev
Copy link
Contributor

It uses map which in python3 returns a iterable, and the proto message takes a list, Unless the message you are using has list, you won't encounter the bug. There might be other bugs like this lurking around, as most of the code was developed under python2.7

I will fix it and probably make a release later tonight.

@Philaeux
Copy link
Contributor Author

Thanks man, I do use python3 indeed.

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

No branches or pull requests

2 participants