diff --git a/app/classes/minecraft/stats.py b/app/classes/minecraft/stats.py index 3cc52f88..64cbf894 100644 --- a/app/classes/minecraft/stats.py +++ b/app/classes/minecraft/stats.py @@ -266,14 +266,24 @@ class Stats: "Unable to read the server icon due to the following error:", exc_info=e ) if ping_obj: - ping_data = { - "online": online_stats.get("online", 0), - "max": online_stats.get("max", 0), - "players": online_stats.get("players", 0), - "server_description": ping_obj.description, - "server_version": ping_obj.version, - "server_icon": server_icon, - } + try: + ping_data = { + "online": online_stats.get("online", 0), + "max": online_stats.get("max", 0), + "players": online_stats.get("players", 0), + "server_description": ping_obj.description, + "server_version": ping_obj.version, + "server_icon": server_icon, + } + except: + ping_data = { + "online": online_stats.get("online", 0), + "max": online_stats.get("max", 0), + "players": online_stats.get("players", 0), + "server_description": "", + "server_version": "", + "server_icon": server_icon, + } else: ping_data = { "online": online_stats.get("online", 0),