Closed hlprimm closed 9 years ago
Fixed the first error with 918d068
@gamingrobot thanks a bunch!!
here's the second error we're looking at. looks like it's still sticking around :/
hlprimm@apollo:~/Code/python/SlackMCRelay$ python example.py
[INFO]: AUTHCORE: Attempting login with username: CENSORED
[INFO]: AUTHCORE: Logged in as: hlprimm
[INFO]: AUTHCORE: Selected Profile: {u'id': u'5505ae3e6d424a53ae059e19479d29e2', u'name': u'hlprimm'}
[INFO]: NETCORE: Attempting to connect to host: mc.civcraft.co port: 25565
[INFO]: NETCORE: Connected to host: mc.civcraft.co port: 25565
[INFO]: AUTHPLUGIN: Attempting to authenticate session with sessionserver.mojang.com
[INFO]: AUTHPLUGIN: Session authentication successful
Chat message received: [00:22:37] <<< (0x03, 0x02): Chat Message {'position': 1, 'json_data': {u'text': u'', u'extra': [{u'color': u'yellow', u'text': u'You have auto-accepted invitation from the following groups while you were away: sjoby.'}]}}
Chat message received: [00:22:37] <<< (0x03, 0x02): Chat Message {'position': 1, 'json_data': {u'text': u'', u'extra': [{u'color': u'white', u'text': u' '}, {u'color': u'white', u'text': u' '}, {u'color': u'dark_blue', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'white', u'text': u' '}, {u'color': u'white', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_red', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'blue', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'blue', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'blue', u'text': u' '}, {u'color': u'dark_green', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'black', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}, {u'color': u'dark_aqua', u'text': u' '}, {u'color': u'gold', u'text': u' '}]}}
Chat message received: [00:22:37] <<< (0x03, 0x02): Chat Message {'position': 1, 'json_data': {u'text': u'', u'extra': [{u'color': u'gray', u'text': u'[NSAccess] hlprimm: '}, {u'color': u'white', u'text': u'Bot active.'}]}}
Chat message received: [00:22:37] <<< (0x03, 0x02): Chat Message {'position': 1, 'json_data': {u'text': u'', u'extra': [{u'color': u'red', u'text': u'You have engaged in combat. Type '}, {u'color': u'aqua', u'text': u'/ct '}, {u'color': u'red', u'text': u'to check your timer.'}]}}
Chat message received: [00:22:37] <<< (0x03, 0x02): Chat Message {'position': 1, 'json_data': {u'text': u'', u'extra': [u'You have been Combat Tagged on Login']}}
Traceback (most recent call last):
File "example.py", line 46, in <module>
client.start(SERVER, 25565)
File "build/bdist.linux-x86_64/egg/spock/plugins/helpers/start.py", line 37, in start
File "build/bdist.linux-x86_64/egg/spock/plugins/core/event.py", line 23, in event_loop
File "build/bdist.linux-x86_64/egg/spock/plugins/core/event.py", line 38, in emit
File "build/bdist.linux-x86_64/egg/spock/plugins/core/net.py", line 201, in tick
File "build/bdist.linux-x86_64/egg/spock/plugins/core/event.py", line 38, in emit
File "build/bdist.linux-x86_64/egg/spock/plugins/core/net.py", line 218, in handle_recv
File "build/bdist.linux-x86_64/egg/spock/plugins/core/net.py", line 137, in read_packet
File "build/bdist.linux-x86_64/egg/spock/mcp/mcpacket.py", line 70, in decode
File "build/bdist.linux-x86_64/egg/spock/mcp/datautils.py", line 220, in unpack
File "build/bdist.linux-x86_64/egg/spock/mcp/datautils.py", line 162, in unpack_metadata
File "build/bdist.linux-x86_64/egg/spock/mcp/datautils.py", line 214, in unpack
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xde in position 0: invalid continuation byte
As requested from echo.py
[INFO]: [01:04:28] <<< (0x03, 0x1C): Entity Metadata {'metadata': [(22, (0, 0)), (21, (2, 6)), (20, (2, 0)), (19, (3, 0.0)), (18, (2, 1)), (17, (2, 0)), (4, (0, 0)), (3, (0, 0)), (2, (4, '')), (1, (1, 300)), (0, (0, 0))], 'eid': 1341826}
[INFO]: [01:04:28] <<< (0x03, 0x12): Entity Velocity {'velocity_z': 0, 'velocity_y': 0, 'velocity_x': 0, 'eid': 1341826}
[INFO]: [01:04:28] <<< (0x03, 0x19): Entity Head Look {'head_yaw': 0, 'eid': 1341826}
[INFO]: [01:04:28] <<< (0x03, 0x0E): Spawn Object {'obj_data': 0, 'x': -1805.5, 'eid': 1341827, 'yaw': 0, 'y': 74.0625, 'obj_type': 10, 'z': -10992.5, 'pitch': 0}
[INFO]: [01:04:28] <<< (0x03, 0x1C): Entity Metadata {'metadata': [(22, (0, 0)), (21, (2, 6)), (20, (2, 0)), (19, (3, 0.0)), (18, (2, 1)), (17, (2, 0)), (4, (0, 0)), (3, (0, 0)), (2, (4, '')), (1, (1, 300)), (0, (0, 0))], 'eid': 1341827}
[INFO]: [01:04:28] <<< (0x03, 0x12): Entity Velocity {'velocity_z': 0, 'velocity_y': 0, 'velocity_x': 633, 'eid': 1341827}
[INFO]: [01:04:28] <<< (0x03, 0x19): Entity Head Look {'head_yaw': 0, 'eid': 1341827}
[INFO]: [01:04:28] <<< (0x03, 0x0E): Spawn Object {'obj_data': 0, 'x': -1814.5, 'eid': 1341836, 'yaw': 64, 'y': 88.0, 'obj_type': 78, 'z': -11006.5, 'pitch': 0}
Traceback (most recent call last):
File "echo.py", line 22, in <module>
client.start('mc.civcraft.co', 25565)
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/helpers/start.py", line 37, in start
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/core/event.py", line 23, in event_loop
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/core/event.py", line 38, in emit
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/core/net.py", line 189, in tick
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/core/event.py", line 38, in emit
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/core/net.py", line 205, in handle_recv
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/plugins/core/net.py", line 129, in read_packet
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/mcp/mcpacket.py", line 70, in decode
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/mcp/datautils.py", line 220, in unpack
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/mcp/datautils.py", line 162, in unpack_metadata
File "/usr/local/lib/python3.4/dist-packages/spock-0.1.2-py3.4.egg/spock/mcp/datautils.py", line 214, in unpack
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xde in position 0: invalid continuation byte
hlprimm@apollo:~/Code/python/SpockBot-Extra/examples$
This is a problem in metadata decoding, probably, armor stands are an old bug that got ignored because they're kinda rare.
Side note: SpockBot was originally built to drive a service called SkyNet on Civcraft, so this is a fun full circle
Fixed fully in #77
@gamingrobot thanks a bunch! glad to hear! @nickelpro yeah, i'm doing a similar project to pipe in game chat to my nation's slack chat. super nifty project you guys have going here!!
So I'm quite new to python and programming overall. I've managed to get example.py running. I tried it out in test.civcraft.co and it worked great. However, trying it out in the main civcraft server mc.civcraft.co causes this error. Let me know if there's anything else I can provide! BTW, I tried running python 3 on
example.py
with my login info in the blanks, but it kept throwing this error:So instead I've been running it as
python3 -m basic.example
... Not sure if this is causing the problem or not!Here is the full ouput!
Is there something I should change?
Thanks a bunch, spockbot is AWESOME!!