Comments (15)
Please provide the full exception traceback.
from mcipc.
Sure!
Traceback (most recent call last):
File "C:/Users/Kunde/PycharmProjects/dscbot/test.py", line 10, in <module>
players = client.players
File "C:\Users\Kunde\PycharmProjects\dscbot\venv\lib\site-packages\mcipc\rcon\client.py", line 102, in players
return Players.from_response(response)
File "C:\Users\Kunde\PycharmProjects\dscbot\venv\lib\site-packages\mcipc\rcon\datastructures\players.py", line 25, in from_response
online, max_, names = match.groups()
AttributeError: 'NoneType' object has no attribute 'groups'
from mcipc.
It looks like the players command returns an unexpected string.
To investigate this, you can insert a print statement after line 23 in players.py
:
print('DEBUG:', text)
In any case: Which version of Minecraft server are you using?
from mcipc.
Got this with the Debug for now:
DEBUG: §6Es sind §c0§6 von maximal §c20§6 Spielern online.
Traceback (most recent call last):
File "C:/Users/Kunde/PycharmProjects/dscbot/test.py", line 10, in <module>
players = client.players
File "C:\Users\Kunde\PycharmProjects\dscbot\venv\lib\site-packages\mcipc\rcon\client.py", line 102, in players
return Players.from_response(response)
File "C:\Users\Kunde\PycharmProjects\dscbot\venv\lib\site-packages\mcipc\rcon\datastructures\players.py", line 26, in from_response
online, max_, names = match.groups()
AttributeError: 'NoneType' object has no attribute 'groups'
Process finished with exit code 0
The Server runs on Version 1.15.2 Paper
from mcipc.
Well, the §c0§6
and §c20§6
should be the respective numbers only.
I.e. 0
and 20
respectively. I don't know where these special character come from.
What does Paper
mean with regards to the version? Is this not a vanilla Minecraft server?
from mcipc.
Right, its a replacement for Spigot.
from mcipc.
But, the others requests are working.
from mcipc.
Well. This plugin obviously results in a different server response.
Unfortunately I don't have enough information on how the responses might look.
If you'd like this function to be supported on this server version, please provide the above debug output with at least two players online, so that I can infer the output format.
from mcipc.
Do you mean like this?
Traceback (most recent call last):
DEBUG: §6Es sind §c2§6 von maximal §c20§6 Spielern online.
File "C:/Users/Kunde/PycharmProjects/dscbot/test.py", line 10, in <module>
players = client.players
File "C:\Users\Kunde\PycharmProjects\dscbot\venv\lib\site-packages\mcipc\rcon\client.py", line 102, in players
§6dev§r: §4SwiftCoding§r§f
return Players.from_response(response)
§6obsidian§r: JustLetHerGo§f
File "C:\Users\Kunde\PycharmProjects\dscbot\venv\lib\site-packages\mcipc\rcon\datastructures\players.py", line 26, in from_response
online, max_, names = match.groups()
AttributeError: 'NoneType' object has no attribute 'groups'
Process finished with exit code 1
from mcipc.
If that's the actual output with two players online, then yes.
But this would mean, that your server version does not return the player names.
This again would mean, that the respective data structure will not have the player names available.
from mcipc.
it kinda returns the playernames i guess?
from mcipc.
§6dev§r: §4SwiftCoding§r§f
return Players.from_response(response)
§6obsidian§r: JustLetHerGo§f
Here - in the error - we got the names. I just dont get the error.
from mcipc.
So..i sorrounded it with a TryException and now it works more or less.
try:
with Client('ip + port) as client:
client.login('pass')
players = client.players
mansion = client.locate('Mansion')
print(players)
print(mansion)
except:
print()
Output:
DEBUG: §6Es sind §c1§6 von maximal §c20§6 Spielern online.
§6login§r: JustLetHerGo§f
from mcipc.
Please test, whether version 1.4.34 fixes this issue.
from mcipc.
For some reason my Python IDE didnt let me update it via pip...
But after some work i updated it.
It works. Thank you!
from mcipc.
Related Issues (20)
- use of built in types for Type hints HOT 2
- Can not install via pip "No matching distribution found for mcipc" HOT 3
- I can't run the example program HOT 4
- TypeError: cannot convert 'NoneType' object to bytes HOT 3
- Linux Bug HOT 2
- Doesn't work anymore HOT 5
- Client.stats() (as depicted in readthedocs) refuses to work HOT 2
- Converting into dict() HOT 2
- Bedrock? HOT 3
- Python 3.8 HOT 1
- is async supporting? HOT 1
- TypeError: 'TypeVar' object is not callable HOT 2
- Long responses from commands are truncated and break the connection HOT 25
- Parsing NBT HOT 2
- Changes to behaviour of Item HOT 6
- I'm having problems creating the code HOT 1
- ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it HOT 1
- An existing connection was forcibly closed by the remote host HOT 3
- Error while attempting to run a command using RCON on a Minecraft Bedrock Server HOT 2
- Circular import error HOT 1
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 mcipc.