SpockBotMC / SpockBot-Extra

Extra plugins and examples for SpockBot
2 stars 2 forks source link

KeyError in tools.py #11

Open solsahar opened 5 years ago

solsahar commented 5 years ago

I am using python 2.7 and am getting an error when running this code:

`from future import absolute_import import logging from follow import FollowPlugin from spockbot import Client from spockbot.plugins import default_plugins

author = 'Me'

logger = logging.getLogger('spockbot') logger.setLevel(logging.DEBUG)

USERNAME = 'Bot' PASSWORD = '' SERVER = 'localhost'

settings = { 'start': { 'username': USERNAME, 'password': PASSWORD, }, }

plugins = default_plugins plugins.append(('follow', FollowPlugin))

client = Client(plugins=plugins, settings=settings) client.start(SERVER, 55607)`

This is the error:

Traceback (most recent call last): File "C:/Users/user/Desktop/bot/Main.py", line 6, in from follow import FollowPlugin File "C:\Users\user\Desktop\bot\follow.py", line 11, in from spockbot.mcdata.constants import PLAYER_HEIGHT File "C:\Users\user\Desktop\bot\venv\lib\site-packages\spockbot__init.py", line 3, in from spockbot.plugins.loader import PluginLoader as Client # noqa File "C:\Users\user\Desktop\Hypixel Bot\venv\lib\site-packages\spockbot\plugins__init__.py", line 1, in from spockbot.plugins.core import auth, event, net, select, \ File "C:\Users\user\Desktop\bot\venv\lib\site-packages\spockbot\plugins\core\net.py", line 15, in from spockbot.mcp import mcpacket, proto File "C:\Users\user\Desktop\bot\venv\lib\site-packages\spockbot\mcp\mcpacket.py", line 13, in from spockbot.mcp.extensions import hashed_extensions File "C:\Users\user\Desktop\bot\venv\lib\site-packages\spockbot\mcp\extensions.py", line 1, in from spockbot.mcdata import constants as const File "C:\Users\user\Desktop\bot\venv\lib\site-packages\spockbot\mcdata__init__.py", line 1, in from spockbot.mcdata import blocks File "C:\Users\user\Desktop\bot\venv\lib\site-packages\spockbot\mcdata\blocks.py", line 3, in from minecraft_data.v1_8 import blocks_list File "C:\Users\user\Desktop\bot\venv\lib\site-packages\minecraft_data\v1_8\init__.py", line 9, in for name, data in convert(_dir).items(): File "C:\Users\user\Desktop\bot\venv\lib\site-packages\minecraft_data\tools.py", line 9, in convert 'blocks': _by_id(data['blocks']), KeyError: 'blocks'

I don't know what to do... I tried this in Python 3.7 and in Python 2.7 and keep getting the same error...

Any help would be greatly appreciated

solsahar commented 5 years ago

Sorry, I didn't mean to post this in Extra!

nickelpro commented 5 years ago

Sorry friend, SpockBot hasn't been supported in a long, long time. I'm working on some related stuff right now but it's faaar away from being public-ready. I highly recommend mineflayer, it's really mature for any simple MC botting stuff you want to do