Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
https://github.com/serverstf/python-valve
I have used it before, and it works for me. Check the ip, port and password are correct
simplest example (from documentation)
If the password has unicode characters in it, you might need
Once you have been ip banned, you will need to unban before trying again
import valve.rcon
address = ('x.x.xx',port)
pwd = 'password'
with valve.rcon.RCON(address,pwd) as rcon:
print(rcon("echo Hello, world!"))
File "C:\Users\xxxx\PycharmProjects\rcon\venv\lib\site-packages\valve\rcon.py", line 524, in authenticate
raise RCONAuthenticationError(True)
valve.rcon.RCONAuthenticationError: Banned
File "C:\Users\xxxx\PycharmProjects\rcon\venv\lib\site-packages\valve\rcon.py", line 180, in decode
id_, type_ = struct.unpack("<i", fixed_fields)
struct.error: unpack requires a buffer of 4 bytes
Process finished with exit code 1
If you can, check the server logs to see if the server has actually banned your ip (if it didn't ban you there may be an issue with python-valve)
The exception is being raised inside the authenticate method, around the _receive method
File "C:\Users\xxxx\PycharmProjects\rcon\venv\lib\site-packages\valve\rcon.py", line 171, in decode
size = struct.unpack("<ii", size_field)[0]
struct.error: unpack requires a buffer of 8 bytes
I mean, what game / server is running ?