Qwizi / cs2-battle-bot

The CS2 Battle Discord Bot is your go-to solution for seamlessly organizing and enjoying 5v5 matches with your friends directly on your Discord server.
12 stars 4 forks source link

UnicodeDecodeError after sending css_endmatch command to the server #8

Closed Qwizi closed 6 months ago

Qwizi commented 7 months ago

There are a issue sometimes happend after sending css_endmatch command to the server with utf-8 decode error.

  File "/app/matches/views.py", line 293, in load
    self.send_rcon_command(load_match_command, match_url, api_key_header, api_key)
  File "/app/matches/views.py", line 120, in send_rcon_command
    return client.run(command,args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/rcon/source/client.py", line 77, in run
    return response.payload.decode(encoding)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 211: invalid continuation byte