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

The coded "3rd person mode" fails to switch back randomly with one of two errors #4

Open
xboxone08 opened this issue Jul 5, 2022 · 0 comments
Labels
bug Something isn't working cantfix Not sure how to fix/fix is not possible external bug The issue is due to a dependency's bug help wanted Extra attention is needed

Comments

@xboxone08
Copy link
Owner

Pressing f5 switches back and forth between normal and the coded "3rd person mode". This sometimes errors out with:

Drained Data:  <b''>
Last Message: <events.block.hits()>
Traceback (most recent call last):
  File "foo_bar.py", line <irrelevant>, in <module>
    events = game.events.pollBlockHits()
  File "/usr/lib/python3/dist-packages/mcpi/minecraft.py", line 172, in pollBlockHits
    return [BlockEvent.Hit(*list(map(int, e.split(",")))) for e in events]
  File "/usr/lib/python3/dist-packages/mcpi/minecraft.py", line 172, in <listcomp>
    return [BlockEvent.Hit(*list(map(int, e.split(",")))) for e in events]
TypeError: Hit() missing 4 required positional arguments: 'y', 'z', 'face', and 'entityId'

or

Drained Data: <b'525'>
Last Message: <world.getPlayerIds()>
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self.kwargs)
  File "/usr/local/lib/python3.7/dist-packages/keyboard/_generic.py", line 58, in process
    if self.pre_process_event(event)
  File "/usr/local/lib/python3.7/dist-packages/keyboard/__init__.py", line 213, in pre_process_event
    key_hook(event)
  File "/usr/local/lib/python3.7/dist-packages/keyboard/__init__.py", line 516, in <lambda>
    return hook_key(key, lambda e: e.event_type == KEY_DOWN or callback(e), suppress=suppress)
  File "foo_bar.py", line <earlier_irrelevant>, in toggle_view
    game.camera.setFollow(game.getPlayerEntityIds()[0])
  File "usr/lib/python3/dist-packages/mcpi/minecraft.py", line 351, in getPlayerEntityIds
    return list(map(int, ids.split("|")))
ValueError: invalid literal for int() with base 10: ''

as mentioned in the issue on the mcpi repository.

@xboxone08 xboxone08 added bug Something isn't working help wanted Extra attention is needed external bug The issue is due to a dependency's bug labels Jul 5, 2022
@xboxone08 xboxone08 changed the title The coded "3rd person mode" fails to switch back if you wait too long The coded "3rd person mode" fails to switch back randomly with one of two errors Jul 5, 2022
@xboxone08 xboxone08 added the cantfix Not sure how to fix/fix is not possible label Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cantfix Not sure how to fix/fix is not possible external bug The issue is due to a dependency's bug help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant