I'm usually printing alot of informations to the console, to just know what's currently going. I've figured out that for some reason, I'm getting UnicodeEncodeErrors when printing player names with special characters, but its seems to be very random, because its fixed after restarting the whole machine and then prints the special characters as normal.
This is what the exception looks like:
Syntax: Select all
[SP] Caught an Exception:
print_console(f"IRC | {server_name} | {name} : {message}")
File "../addons/source-python/plugins/SurfTricks/libs/core/globals.py", line 1407, in print_console
print(message)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 63-65: ordinal not in range(128)
I would probably need to encode and decode the names again, but is there a reason for this happening, since its working as intended for the most time?