Skip to content

Are non-source servers supported? ServerQuerier (Mordhau timeout) #75

@NotTrying

Description

@NotTrying

Ive got both source and non-source servers to work but cant get any Mordhau servers to work, Another game I have tried and failed to get any responses from is Warband. They all time out?

Can we only work with source servers and just get lucky on some non-source servers working (like Squad)? Or is something else going on?
For example Squad works fine, which I believe is the same engine as Mordhau (EU4).

Anyone have any ideas how I can get these other game servers working?
Thanks!

  • Python-valve Version(s): 0.2.1
  • Python Version(s): 3.7.3
  • Operating System(s)/Platform(s): win10
  • Game Server(s) and Version(s): Any mordhau / warband server

Code

import valve.source.a2s
SERVER_ADDRESS = ('147.135.6.200', 7779)
with valve.source.a2s.ServerQuerier(SERVER_ADDRESS, timeout=5) as server:
    info = server.info()
    players = server.players()

print("{player_count}/{max_players} {server_name}".format(**info))
for player in sorted(players["players"],
                     key=lambda p: p["score"], reverse=True):
    print("{score} {name}".format(**player)) 

Error

Traceback (most recent call last):
  File "../test.py", line 4, in <module>
    info = server.info()
  File "..\valve\source\a2s.py", line 140, in info
    return messages.InfoResponse.decode(self.get_response())
  File "..\valve\source\a2s.py", line 33, in get_response
    data = valve.source.BaseQuerier.get_response(self)
  File "..\valve\source\__init__.py", line 78, in wrapper
    return function(self, *args, **kwargs)
  File "..\valve\source\__init__.py", line 121, in get_response
    raise NoResponseError("Timed out waiting for response")
valve.source.NoResponseError: Timed out waiting for response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions