Menu

#2 rcon_command() can't handle large ammount of data

open
nobody
None
5
2012-09-14
2008-06-28
Adam
No

When I try to use srcds.py to list all the cvars or list the bans on my server, (around 163). I get an index out of range error.

Probably easiest to see by listing all your cvars

sf.rcon_command("cvarlist")
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
sf.rcon_command("listid")
File "C:\Documents and Settings\Adam\Desktop\SRCDS.py", line 226, in rcon_command
return self._any_rcon_response(command)
File "C:\Documents and Settings\Adam\Desktop\SRCDS.py", line 198, in _any_rcon_response
return self._any_rcon_response_hl2(command)[3]
File "C:\Documents and Settings\Adam\Desktop\SRCDS.py", line 209, in _any_rcon_response_hl2
result = self.read_packet()
File "C:\Documents and Settings\Adam\Desktop\SRCDS.py", line 163, in read_packet
return (packetlen, req_id, command, strs[0], strs[1])
IndexError: list index out of range

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.