Comments (12)
Thanks
from minestat.
It`s OK
Python 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from data_source import *
>>> ms=MineStat('w1024jk.asia',30080)
>>> ms.version
'1.19.2'
>>> ms.motd
'{"text": "SiTanCraft Server"}'
>>> ms.slp_protocol
<SlpProtocols.JSON: 3>
>>> ms.connection_status
<ConnStatus.SUCCESS: 0>
>>>
from minestat.
Greetings, @molanp.
I just successfully tested using Python versions 3.9.2 and 3.10.4 to connect to an address containing a hyphen ('-'). I tested against a version 1.8 Java server and a version 1.19.50 Bedrock server. See the output below. Is it possible that there is a bug in your custom code?
<23:28:58> (~/projects/minestat/Python) [master *?]
[ldilley@winux] :) {2120}$ python3 -V
Python 3.10.4
<23:29:01> (~/projects/minestat/Python) [master *?]
[ldilley@winux] :) {2121}$ python3 example.py
Minecraft server status of test-host.dom on port 19132:
Server is online running version 1.19.50 Bedrock level(MCPE) with 0 out of 10 players.
Message of the day: Dedicated Server
Message of the day without formatting: Dedicated Server
Latency: 0ms
Connected using protocol: BEDROCK_RAKNET
<23:36:23> (~/projects/minestat/Python) [master *?]
[ldilley@winux] :) {2123}$ python3 -V
Python 3.9.2
<23:36:54> (~/projects/minestat/Python) [master *?]
[ldilley@winux] :) {2124}$ python3 example.py
Minecraft server status of test-host.dom on port 25565:
Server is online running version 1.8 with 0 out of 20 players.
Message of the day: A Minecraft Server
Message of the day without formatting: A Minecraft Server
Latency: 0ms
Connected using protocol: JSON
from minestat.
The source code of the package was copied last night (1/12 21:31UTC+8), just now I tested it again, and the output is as follows
There are two more lines of code than the original package because I declared the source at the beginning of the file
from minestat.
Is the version of this server bedrock_server0.14 too old?😂
from minestat.
It looks like this server does not send a secondary MotD or a game mode. If I refrain from reading those fields, I get an acceptable response per the output below. I'll submit a fix tomorrow that validates whether or not those fields are populated prior to reading them. This symptom may also be present in the other language implementations. As a result, these may require a fix as well. Thank you for raising this issue, @molanp.
Raw response:
MCPE;§6生存斧§4服§2务§1器 §5QQ群625015871;70;0.14;23;24
Typically, we would see something like below (note all the additional fields). Unique server ID, secondary MotD, game mode, numeric game mode, IPv4 port number, and IPv6 port number must have been added later.
MCPE;Dedicated Server;390;1.14.60;0;10;13253860892328930865;Bedrock level;Survival;1;19132;19133;
Successful test after omitting the absent fields:
Minecraft server status of mc-kkk.top on port 19132:
Server is online running version 0.14 with 23 out of 24 players.
Message of the day: §6生存斧§4服§2务§1器 §5QQ群625015871
Message of the day without formatting: 生存斧服务器 QQ群625015871
Latency: 1ms
Connected using protocol: BEDROCK_RAKNET
from minestat.
The PyPI package has been updated to version 2.4.2
, @molanp. Please let me know if that resolved your issue.
from minestat.
oh...(Two lines of comments are still added at the beginning of the code)
from minestat.
Hm. The latest Python code from commit 0ba8e04 is working here using the same server now:
Minecraft server status of mc-kkk.top on port 19132:
Server is online running version 0.14 (MCPE) with 6 out of 7 players.
Message of the day: §6生存斧§4服§2务§1器 §5QQ群625015871
Message of the day without formatting: 生存斧服务器 QQ群625015871
Latency: 228ms
Connected using protocol: BEDROCK_RAKNET
from minestat.
OK,now it's up and running
from minestat.
Well,there's another issue here, and I don't think it needs to raise another issue.
Everything works fine, but TIMEOUT
from minestat.
What happens if you modify line 250 to the following?
250 if self.online:
251 self.connection_status = ConnStatus.SUCCESS
252 else:
253 self.connection_status = result
from minestat.
Related Issues (20)
- Add package platform keys/tokens as secrets to automate publishing HOT 3
- Bedrock support broken HOT 7
- Address vulnerabilities in Java dependencies HOT 1
- Expose ConnStatus HOT 4
- Favicon Support HOT 3
- Feature Request - Net Core Support HOT 3
- Minestat Java reports servers as always offline (MC 1.19.2 / Java 17) HOT 12
- [Javascript] minestat.online returns True even after server is shut down HOT 6
- Python bug preventing SLP querying
- Some servers cannot query the information HOT 10
- Add support for SRV record resolution
- Add GameSpy4/UT3 query protocol support
- JSON Protocol Is Removing Whitespace In MOTD HOT 2
- Is there a Gradle version for java? HOT 2
- A question about Java and bedrock server protocols HOT 9
- Python: Port from SRV record is not used HOT 1
- PHP @ Minestat erroe on socket_recv() line 293 HOT 9
- Powershell -> PHP HOT 3
- Player Username option HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minestat.