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

a2s.ainfo() leading to TypeError: raise_on_error() takes 0 positional arguments but 1 was given #14

Closed
Nereg opened this issue Sep 19, 2020 · 1 comment

Comments

@Nereg
Copy link
Contributor

Nereg commented Sep 19, 2020

Hello! I was working with your library and encountred such error:

Traceback (most recent call last):
  File "/app/src/updater.py", line 82, in update_server
    serverObj = await c.ARKServer(ip).AGetInfo() # get info about server
  File "/app/src/classes.py", line 37, in AGetInfo
    server = await a2s.ainfo((self.address,self.port)) # get server data
  File "/usr/local/lib/python3.7/site-packages/a2s/info.py", line 277, in ainfo
    resp_data = await conn.request(b"\x54Source Engine Query\0")
  File "/usr/local/lib/python3.7/site-packages/a2s/a2sasync.py", line 92, in request
    return await self.recv()
  File "/usr/local/lib/python3.7/site-packages/a2s/a2sasync.py", line 84, in recv
    self.protocol.raise_on_error()
TypeError: raise_on_error() takes 0 positional arguments but 1 was given

You can find code here (ARKServer.AGetInfo() and PlayersList.AgetPlayersList()). But sadly I couldn't reproduce that error on my computer so maybe it is affected by how many request I send (I update info about servers every 30 seconds or so)

@Nereg
Copy link
Contributor Author

Nereg commented Sep 19, 2020

I found that in raise_on_error you forgot to add self as first parameter of class function. I tested it and it works well on test stand but I will test it on my production before submitting pull request

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

No branches or pull requests

1 participant