mcstatus icon indicating copy to clipboard operation
mcstatus copied to clipboard

Status fails to process a JSON MOTD containing only a translation

Open norhu1130 opened this issue 2 years ago • 7 comments

OSError: Server did not respond with any information!

I am not proceeding with the query. When progressing status = server.status(), the following error occurs.

D:\Lunar>py server.py
Traceback (most recent call last):
  File "server.py", line 4, in <module>
    status = server.status()
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\server.py", line 116, in status
    return self._retry_status(connection, **kwargs)
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\utils.py", line 53, in sync_wrapper
    raise last_exc  # type: ignore # (This won't actually be unbound)
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\utils.py", line 49, in sync_wrapper
    return func(*args, **kwargs)
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\server.py", line 122, in _retry_status
    result = pinger.read_status()
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\pinger.py", line 67, in read_status
    response = self.connection.read_buffer()
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\protocol\connection.py", line 140, in read_buffer
    length = self.read_varint()
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\protocol\connection.py", line 68, in read_varint
    part = self.read(1)[0]
  File "C:\Users\norhu1130\AppData\Local\Programs\Python\Python38\lib\site-packages\mcstatus\protocol\connection.py", line 220, in read
    raise IOError("Server did not respond with any information!")
OSError: Server did not respond with any information!

norhu1130 avatar May 29 '22 08:05 norhu1130

Looks as if some firewall between the script and the server is interfering. Hard for us to help though given that you haven't shared any versions nor the address of this server. Perhaps the server was still starting or was not running?

kevinkjt2000 avatar May 30 '22 02:05 kevinkjt2000

The server is on, and the firewall is fine, too Server information is available at beeonline.kro.kr

norhu1130 avatar May 30 '22 11:05 norhu1130

the firewall is fine

And it could be the problem. Make sure the necessary port is open in that firewall.

kevinkjt2000 avatar May 31 '22 12:05 kevinkjt2000

server.status() Does need a Query?

norhu1130 avatar Jun 01 '22 00:06 norhu1130

I had more time to investigate tonight and found that the port is open, so that's not the issue.

The issue is in the _parse_description function not being able to handle {'translate': 'VDZsaXJnZThoa3RaWlZ1SFdXcStBdz09'} as input.

kevinkjt2000 avatar Jun 01 '22 01:06 kevinkjt2000

Looks like mcsrvstat.us also can't get server's MOTD: image Could it be server's software problem?

P.S. I also checked MOTD with standard Minecraft, it shows random string.

PerchunPak avatar Jun 24 '22 06:06 PerchunPak

Should be fixed in #335 after this.

>>> Motd.parse({'translate': 'VDZsaXJnZThoa3RaWlZ1SFdXcStBdz09'}).parsed
[TranslateString(id='VDZsaXJnZThoa3RaWlZ1SFdXcStBdz09'), <Formatting.RESET: 'r'>]

PerchunPak avatar Jul 02 '22 15:07 PerchunPak