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

error when running the example bot with minimal modification #229

Open
ghostAttackerIsTaken opened this issue Aug 9, 2017 · 11 comments
Open

Comments

@ghostAttackerIsTaken
Copy link

hi, i want to say that i'm a complete newbie in spockbot and i was trying to learn, i thought i'll start by running the example bot, and then modifying it for what i want and need instead of starting writing from scratch because i'm a complete newbie, and then i got this error message right after i recieved the player has joined the game message:

[DEBUG]: EVENTCORE: Exception while emitting PLAY<Map Chunk Bulk [06:24:21] <<< (0x03, 0x26): Map Chunk Bulk {'data': b'<really long hexa>', 'metadata': [{'chunk_z': 3, 'primary_bitmap': 31, 'chunk_x': -5}, {'chunk_z': 3, 'primary_bitmap': 31, 'chunk_x': -4}, {'chunk_z': 4, 'primary_bitmap': 31, 'chunk_x': -4}, {'chunk_z': 4, 'primary_bitmap': 31, 'chunk_x': -5}, {'chunk_z': 4, 'primary_bitmap': 31, 'chunk_x': -6}, {'chunk_z': 3, 'primary_bitmap': 31, 'chunk_x': -6}, {'chunk_z': 2, 'primary_bitmap': 31, 'chunk_x': -6}, {'chunk_z': 2, 'primary_bitmap': 31, 'chunk_x': -5}, {'chunk_z': 2, 'primary_bitmap': 31, 'chunk_x': -4}, {'chunk_z': 2, 'primary_bitmap': 31, 'chunk_x': -3}], 'sky_light': True} [DEBUG]: EVENTCORE: Exception while emitting select_recv 4 [DEBUG]: EVENTCORE: Exception while emitting event_tick None Traceback (most recent call last): File "./McGhostBot", line 41, in <module> client.start(SERVER, 25565) File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/helpers/start.py", line 34, in start File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/event.py", line 29, in event_loop File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/event.py", line 36, in run_continuous File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/event.py", line 62, in emit File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/net.py", line 160, in tick File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/select.py", line 70, in poll File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/event.py", line 62, in emit File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/net.py", line 176, in handle_recv File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/net.py", line 114, in read_packet File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/core/event.py", line 62, in emit File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/helpers/world.py", line 101, in handle_map_chunk_bulk File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/tools/smpmap.py", line 247, in unpack_bulk File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/tools/smpmap.py", line 220, in unpack File "/usr/local/lib/python3.5/dist-packages/spockbot-0.2.0-py3.5.egg/spockbot/plugins/tools/smpmap.py", line 172, in unpack IndexError: cannot fit 'int' into an index-sized integer
i'm running on the latest release of kali linux 32 machine on a 64 hardware,
thank you for the help, very appriciated.

@arthuro555
Copy link

I can't even start it

C:\Users\pc\tmp\SpockBot\examples\basic>py example.py
Traceback (most recent call last):
  File "example.py", line 18, in <module>
    from example_plugin import ExamplePlugin
  File "C:\Users\pc\tmp\SpockBot\examples\basic\example_plugin.py", line 17, in <module>
    from spockbot.mcdata import blocks
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "C:\Python37\lib\site-packages\spockbot-0.2.0-py3.7.egg\spockbot\__init__.py", line 3, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "C:\Python37\lib\site-packages\spockbot-0.2.0-py3.7.egg\spockbot\plugins\__init__.py", line 3, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 963, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 906, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1280, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1254, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1235, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 441, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 594, in spec_from_file_location
  File "C:\Python37\lib\site-packages\spockbot-0.2.0-py3.7.egg\spockbot\plugins\helpers\craft.py", line 87
    yield inv.async.click_slot(ingr_slot)
                  ^
SyntaxError: invalid syntax

@Gjum
Copy link
Member

Gjum commented Apr 8, 2019

Seems like async is now a reserved keyword. You're gonna have to rename the whole async module to something else I guess.

@arthuro555
Copy link

arthuro555 commented Apr 8, 2019

I did It but now, It connects and after a few seconds on the server it turns crazy and prints that:
https://pastebin.com/7s7HN3ee
The server behaves as intended.

@nickelpro
Copy link
Member

Map format changed, our ancient map module doesn't know how to decode it and chokes. Everything then breaks.

@Skelmis
Copy link

Skelmis commented Aug 11, 2020

Will this be issue be fixed for future releases at any point?

@arthuro555
Copy link

Last commit being from 2016 I can say pretty confidently this project is 100% abandonned.

@Skelmis
Copy link

Skelmis commented Aug 11, 2020

Fair enough, time to fork & fix I guess provided I can get it working

@arthuro555
Copy link

I guess you are more a python person if you checked this out first, but I'd recommend using this Node library: https://github.com/PrismarineJS/mineflayer

@Skelmis
Copy link

Skelmis commented Aug 11, 2020

I have looked into numerous libraries for this, and mineflayer was the first one haha. But unfortunately, I am looking for something in python and my current one I am using is coming into issues with scaling & the async nature is called under. Plus it only handles the very basics. But thanks anyway
https://github.com/ammaraskar/pyCraft

@nickelpro
Copy link
Member

nickelpro commented Aug 11, 2020

If you're comfortable with compiling C++ I have a new framework that handles all packets and I'm actively developing:
https://github.com/SpockBotMC/RikerBot

@Gjum
Copy link
Member

Gjum commented Aug 11, 2020

@Skelmis if you're fixed on python you may want to check out Quarry too: https://github.com/barneygale/quarry/

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

5 participants