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

[query] full_stats throws OverflowError #5

Closed
Itzdvbravo opened this issue May 12, 2020 · 3 comments
Closed

[query] full_stats throws OverflowError #5

Itzdvbravo opened this issue May 12, 2020 · 3 comments

Comments

@Itzdvbravo
Copy link

Itzdvbravo commented May 12, 2020

Ignoring exception in on_command_error
Traceback (most recent call last):
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\Users\prave\Desktop\Codest\Python\MSC\SerenityBot.py", line 280, in mctest2
    full_stats = client.full_stats
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mcipc\query\proto\full_stats.py", line 177, in full_stats
    return self.communicate(request, FullStats)
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mcipc\query\client.py", line 48, in communicate  
    self._socket.send(bytes(packet))
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\mcipc\query\proto\full_stats.py", line 107, in __bytes__
    payload += self.challenge_token.to_bytes(4, 'big')
OverflowError: can't convert negative int to unsigned

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\client.py", line 312, in _run_event      
    await coro(*args, **kwargs)
  File "c:\Users\prave\Desktop\Codest\Python\MSC\SerenityBot.py", line 50, in on_command_error
    raise error
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\prave\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: OverflowError: can't convert negative int to unsigned
@bot.command()
async def mctest2(ctx):
    with Client(ip, port) as client:
        full_stats = client.full_stats
    await ctx.send(full_stats)

Fix this issue please, i like this lib, basic_stats working fine but not this one

@conqp
Copy link
Owner

conqp commented May 12, 2020

A vanilla server should never return a negative challenge token.
What Minecraft version are you using?
Please also test whether 0388399 fixes the issue.

@conqp conqp changed the title An Issue With full_stats [query] full_stats throws OverflowError May 12, 2020
@Itzdvbravo
Copy link
Author

am using mcpe btw

@Itzdvbravo
Copy link
Author

and yes it does fix it thx

@conqp conqp closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants