When you send a query to a server that is turned off, the message 'ConnectionResetError: [WinError 10054] Current connection is forcefully broken by a remote host' appears. How can I print that the server is turned off without leaving it like this? #120
This issue tracker is not here to teach you Python nor is it for us to write your code for you. You should be able to make a script that prints Online or Offline on your own... If a server is offline, mcstatus functions will raise an appropriate exception that your script can catch. If a server is online, there will be no exceptions, so your script could print "Online".
Hint: you'll want a try-catch block
If you need more of a hint than what I've given, you should seek help from a Python community. There's some popular ones on Discord if you spend a little time Googling. In my opinion, you probably need to spend more time learning from Python tutorials.
This issue tracker is not here to teach you Python nor is it for us to write your code for you. You should be able to make a script that prints Online or Offline on your own... If a server is offline, mcstatus functions will raise an appropriate exception that your script can catch. If a server is online, there will be no exceptions, so your script could print "Online".
Hint: you'll want a try-catch block
If you need more of a hint than what I've given, you should seek help from a Python community. There's some popular ones on Discord if you spend a little time Googling. In my opinion, you probably need to spend more time learning from Python tutorials.