Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeoutError: timed out Bedrock Server #483

Closed
ihs4ndemirci opened this issue Feb 10, 2023 · 11 comments
Closed

TimeoutError: timed out Bedrock Server #483

ihs4ndemirci opened this issue Feb 10, 2023 · 11 comments
Labels
meta: duplicate This issue or pull request already exists

Comments

@ihs4ndemirci
Copy link

[ERROR ] discord.client: Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "C:\Users\Administrator\Desktop\magic\bot.py", line 29, in on_ready
status = server.status()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcstatus\utils.py", line 66, in sync_wrapper
raise last_exc # type: ignore # (This won't actually be unbound)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcstatus\utils.py", line 62, in sync_wrapper
return func(*args, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcstatus\server.py", line 213, in status
return BedrockServerStatus(self.address, self.timeout, **kwargs).read_status()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcstatus\bedrock_status.py", line 49, in read_status
data = self._read_status()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\mcstatus\bedrock_status.py", line 58, in _read_status
data, _ = s.recvfrom(2048)
TimeoutError: timed out``

@ihs4ndemirci
Copy link
Author

Code:

server = BedrockServer.lookup("play.magicyour.tk:19132")
status = server.status()
await bot.change_presence(activity=discord.Game(name=f"{status.players_online} kişi sunucuda"))

@ItsDrike
Copy link
Member

TimeoutError means the connection wasn't established within some specified time. The server you're pinging is likely just offline

@ihs4ndemirci
Copy link
Author

TimeoutError means the connection wasn't established within some specified time. The server you're pinging is likely just offline

n-no, server online.

@ihs4ndemirci
Copy link
Author

image

@ihs4ndemirci
Copy link
Author

is online

@ItsDrike
Copy link
Member

ItsDrike commented Feb 10, 2023

Well, a timeout error indicates that the connection couldn't be established within some maximum time. Perhaps there's a firewall blocking the connection, either on your side, or the server may be blocking your IP, it's hard to say. Does this only happen sometimes, or on every attempt? Maybe try pinging that IP, see if you can even connect to that server. Also, make sure you're using the right IP and port, this might just be a typo

@PerchunPak
Copy link
Member

The server is active if check with mcsrvstat.us.

@ihs4ndemirci
Copy link
Author

Screenshot_2023-02-10-11-28-27-40.jpg

Look

@PerchunPak
Copy link
Member

PerchunPak commented Feb 10, 2023

Duplicate of #433. Fix for that issue is not on PyPI yet, so you need to install mcstatus from 22788ad (or newer, but note that there are a lot of breaking changes in master, which is blocked for releasing by broken documentation).

pip install git+https://github.com/py-mine/mcstatus.git@22788ad5d17b2da5d2e04fe4f79df1cd1aa3caf4

@kevinkjt2000 kevinkjt2000 added the meta: duplicate This issue or pull request already exists label Feb 10, 2023
@ihs4ndemirci
Copy link
Author

WARNING: Ignoring invalid distribution -ip (c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages)
Collecting git+https://github.com/py-mine/mcstatus.git@22788ad5d17b2da5d2e04fe4f79df1cd1aa3caf4
  Cloning https://github.com/py-mine/mcstatus.git (to revision 22788ad5d17b2da5d2e04fe4f79df1cd1aa3caf4) to c:\users\administrator\appdata\local\temp\2\pip-req-build-b3uy0qod
  ERROR: Error [WinError 2] The system cannot find the file specified while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
WARNING: Ignoring invalid distribution -ip (c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages)```

@kevinkjt2000
Copy link
Contributor

You would have to have git installed for that path to work. It's in the ERROR message...
This was already marked as a duplicate. I would suggest moving further discussion into #433, but that issue is already marked as resolved as of Dec 24, 2022 by code from #439. A new release for that version has not been cut yet.

It should be possible to use that same commit-ref without needing git installed by using this URL instead https://github.com/py-mine/mcstatus/archive/22788ad5d17b2da5d2e04fe4f79df1cd1aa3caf4.zip

Locking this conversation at this point.

@py-mine py-mine locked as resolved and limited conversation to collaborators Feb 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
meta: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants