SpockBotMC / SpockBot

High level Python framework for building Minecraft clients and bots.
MIT License
198 stars 47 forks source link

error when running the example bot with minimal modification #229

Open ghostAttackerIsTaken opened 7 years ago

ghostAttackerIsTaken commented 7 years ago

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 commented 5 years ago

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 commented 5 years ago

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

arthuro555 commented 5 years ago

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 commented 5 years ago

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

Skelmis commented 4 years ago

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

arthuro555 commented 4 years ago

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

Skelmis commented 4 years ago

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

arthuro555 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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