Can't get Scratch to talk to Minecraft

226 views
Skip to first unread message

domgl...@gmail.com

unread,
Apr 17, 2016, 9:54:32 AM4/17/16
to Coding in Minecraft
Hi, I'm working through the magazine with my son and we've got to Exercise 1, but the co-ordinates don't display in Minecraft when we click the green flag in Scratch.

One thing I've noticed is that the Python module doesn't produce much output, only:

 RESTART: C:\Users\johnn\OneDrive\Documents\mcpi-scratch-master\mcpi-scratch.py
INFO:__main__:Namespace(host=None)
INFO:__main__:Starting server, use <Ctrl-C> to stop

The first time we tried running this, it just gave an endless stream of error messages.

Is something wrong in the setup? How can I check?

Thanks,

Dom

domgl...@gmail.com

unread,
Apr 18, 2016, 6:37:22 AM4/18/16
to Coding in Minecraft
I'm using my son's account, so not logged in as an administrator, Do I need to run any of the programs with admin rights? Or do something on the firewall?

woogadoo

unread,
Apr 20, 2016, 5:02:11 PM4/20/16
to Coding in Minecraft
Hi Dom

Sorry you're having trouble and apologies for the delay - I've been travelling. Have you got McMyAdmin, CraftBukkit and the RaspberryJuice plugin all up and running as well?

domgl...@gmail.com

unread,
Apr 21, 2016, 8:05:19 AM4/21/16
to Coding in Minecraft
Hi, thanks for the reply. McMyAdmin - yes, we've logged in and set up a server. I've checked with /version and it's running CraftBukkit 1.6.4. RaspberryJuice appears under Plugins in the McMyAdmin config, is there a way to check this within Minecraft?

We've started a game and connected to the server fine. My initial diagnosis, that the Python module is not detecting the server, appears to be wrong - when I run it without a server running, it gives various error messages; when I run it with the server running, I get the output given above.

I've started Scratch Offline Editor with the first script - to post position to chat - but that's not appearing in Minecraft when we click the green flag.

Jim Christian

unread,
Apr 26, 2016, 3:25:55 AM4/26/16
to Coding in Minecraft
It sounds like you've got everything in place. Are you running the correct version of Python (2.x)?

domgl...@gmail.com

unread,
Apr 26, 2016, 1:31:06 PM4/26/16
to Coding in Minecraft
Yes, 2.7.11.

Richard Sheppard

unread,
May 1, 2016, 5:26:34 AM5/1/16
to Coding in Minecraft
I had a similar thing - in my case, I hadn't done things in the right order. Perhaps close it all down and follow the steps on page 25 under 'The order of things'?

domgl...@gmail.com

unread,
May 7, 2016, 1:41:56 PM5/7/16
to Coding in Minecraft
Hi Richard, I'm pretty sure I was following the right order of things, but I've just tried again, and am getting an error when running the Python script - it essentially repeats this:


RESTART: C:\Users\johnn\OneDrive\Documents\mcpi-scratch-master\mcpi-scratch.py
INFO:__main__:Namespace(host=None)
INFO:__main__:Starting server, use <Ctrl-C> to stop
DEBUG:__main__:poll: 1
DEBUG:__main__:call mc
DEBUG:__main__:Vec3(13,0,-174)
DEBUG:__main__:pollResp: 13
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 64528)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\SocketServer.py", line 655, in __init__
    self.handle()
  File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "C:\Users\johnn\OneDrive\Documents\mcpi-scratch-master\mcpi-scratch.py", line 293, in do_GET
    message = '\r\n'.join(message_parts)
TypeError: sequence item 1: expected string, int found
----------------------------------------

Does this shed any light on the issue?

Richard Sheppard

unread,
May 7, 2016, 2:00:28 PM5/7/16
to Coding in Minecraft
Thanks for sharing that - I can only speculate that perhaps it's a firewall issue on your PC? I'll try to have a look at it in detail later this evening or tomorrow.

domgl...@gmail.com

unread,
May 8, 2016, 9:38:41 AM5/8/16
to Coding in Minecraft
Hi Richard, that would be much appreciated, thank you.

paulwr...@gmail.com

unread,
May 9, 2016, 6:49:36 AM5/9/16
to Coding in Minecraft
Hi Dom 
This probably won't help.  But ill post some of my outputs as I start everything.








On the left is the output after starting McMyAdmin (Before starting the Local host web browser )














On the left is the output after signing in to McMyAdmin  in the web browser and starting a minecraft game


















On the left is the McMyAdmin output after after starting Scratch and running the Mcpi_scratch.py file.

gwit...@gmail.com

unread,
May 10, 2016, 4:06:37 PM5/10/16
to Coding in Minecraft
Hi Dom,

I've had the same problem the last couple of days but I think I have fixed it. I found that sending to Minecraft was not a problem, just receiving from it (for instance the players position), caused by an exception via Raspberry Juice. I download Raspberry Juice 1.5 - http://dev.bukkit.org/bukkit-plugins/raspberryjuice/files/7-raspberry-juice-v1-5/ and installed that instead (place it in the plugins folder in your server folder). I can now get the player position sent to the chat window, hopefully the rest will work now too!

Gwith

domgl...@gmail.com

unread,
May 12, 2016, 6:17:08 AM5/12/16
to Coding in Minecraft
Hi Gwith, that appears to have fixed it! We're now happily building a Diamond House in Scratch. Thank you so much for this.

gwit...@gmail.com

unread,
May 12, 2016, 8:03:36 AM5/12/16
to Coding in Minecraft
No problem, glad I could help. Me & my son are at about the same point in the book :)

Garrett

unread,
May 14, 2016, 5:36:34 PM5/14/16
to Coding in Minecraft
+1 

Also many thanks from me. 

I was facing the exact same problem and your suggestion to download and use an older version (1.5) of RaspberryJuice has solved it.

I am now very pleased to be in a position to move on to the next exercises with my daughter. This problem cost me about 4 hours today during which my 9 year old could not hide the disappointment in seeing her father struggle in Chapter 2!!!

But why is it that version 1.8 of RaspberryJuice is not working for some of us?

Richard Sheppard

unread,
May 16, 2016, 5:26:45 AM5/16/16
to Coding in Minecraft
But why is it that version 1.8 of RaspberryJuice is not working for some of us?

Good question! You could have a look around the forums here:  http://dev.bukkit.org/bukkit-plugins/raspberryjuice/

It also looks like they develop out in the open: https://github.com/zhuowei/RaspberryJuice
Reply all
Reply to author
Forward
0 new messages