Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Getting timeout for status.plays.online #222

Closed Carterb188 closed 1 year ago

Carterb188 commented 1 year ago

I call McStatus (My file that grabs the server) which passes it to the variable "server". everything works fine until I get to the line "players_on = str(status.players.online)" my program will not get past this point without getting a time out error.

Import mcStatus

def get_response(message: str) -> str:
    p_message = message.lower()

    if p_message == '!hello':
        return 'Hey there!'

    if p_message == '!server':
        server = mcStatus.getServer()
        print(server)

        status = server.status()
        print("server status fetched")
        players_on = str(status.players.online)
        print(players_on)
        return players_on
    else:

    return 'I didn\'t understand what you wrote. Try typing "!help".'
PerchunPak commented 1 year ago

Can you please send the full error?

kevinkjt2000 commented 1 year ago

This is the wrong repo to post this issue too. Please visit the new location and provide more information.