ValvePython / steam

☁️ Python package for interacting with Steam
http://steam.readthedocs.io
MIT License
1.1k stars 148 forks source link

get_server_list() always returns TypeError #249

Closed impaex closed 4 years ago

impaex commented 4 years ago

I tried running this code:

from steam import client
for x in client.builtins.gameservers.SteamGameServers.get_server_list(r'\appid\730\white\1'):
  print(str(gs.a2s_info(x)))

No matter what I do, line 2 returns the following error:

TypeError: get_server_list() missing 1 required positional argument: 'filter_text'

I would love to know why it doesn't work.

rossengeorgiev commented 4 years ago

Yes, it's a instance method, not a static method. You need to create a SteamClient instance, and call client.gameservers.get_server_list(...)