Can't get through chapter 1 on linux

55 views
Skip to first unread message

Jean-Baptiste Richet

unread,
May 9, 2021, 4:58:09 PM5/9/21
to Adventures in Minecraft Forum

Hi,

My son is 10 years old, and he received your second edition as birthday gift by a friend. He his quite impatient to dive into it (part of it because I had to by him a licence of his favorite game!). I'm glad he is volunter to learn coding, so I'm working hard to make it work on our linux computer. Your book is a good opportunity to have him start coding ! And the translation in French seems fine, as far as I read. Eyrolles editions are doing serious job, as always.

I did a lot, already, but at the final step a strange error message is given by python. I know linux is not officially supported, but if you have a minute, an expert eye and kind advices would be greatly appreciated!

Context : manjaro distribution, up to date, python 3.9.4.1, and well I guess hardware is not an issue, but just ask if it might be relevant.

Events : I prepared everything following the steps given at https://github.com/AdventuresInMinecraft/AdventuresInMinecraft-Linux
starting by compiling a server from https://www.spigotmc.org/wiki/buildtools/
with a java -jar BuildTools.jar --rev 1.12 to be coherent with your book.
I followed carefully your starterkit creation guide till the end, and I suppose I did well as the server is running, with the right version, and that the client (also in version 1.12) is correctly logging in it :
[22:18:54 INFO]: fireupgeek[/127.0.0.1:47604] logged in with entity id 319 at ([world]-103.1095229303037, 63.0, 241.98663148121827)
But then the code of the "hello world" has an error message :
== RESTART: /home/philemon/AdventuresInMincraft/MyAdventures/bonjourlemonde.py =
Traceback (most recent call last):
  File "/home/philemon/AdventuresInMincraft/MyAdventures/bonjourlemonde.py", line 2, in <module>
    mc = minecraft.Minecraft.create()
  File "/home/philemon/AdventuresInMincraft/MyAdventures/mcpi/minecraft.py", line 205, in create
    return Minecraft(Connection(address, port))
  File "/home/philemon/AdventuresInMincraft/MyAdventures/mcpi/connection.py", line 17, in __init__
    self.socket.connect((address, port))
ConnectionRefusedError: [Errno 111] Connection refused

If I understand well, connect is expecting a tuple with address and port, but line 2 of our code gives nothing... But all your examples have empty brackets for Minecraft.create(), so... I really don't know what to try. That's why I ask here !
Tomorrow and for one week, my son will be by his mother. She has windows 10, so I hope he will be able to make it work straitforward with your starterkit. But I'd really like to code with him when he's by me, on linux...

Thanks a lot in advance for your time to our tiny problem!
Cheers,
Jean-Baptiste
Reply all
Reply to author
Forward
Message has been deleted
0 new messages