[Mod] Raspberry PI MC API for Python code [raspberryjammod]
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
have you added "secure.enable_security = true" to your minetest.conf? That is what fixed that error for me.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
add this to minetest.conf:GRudolph wrote:@jocsamazon
I would like to know what specific changes you made in order to run minetest with raspberryjammod?
I am running Windows 10, Minetest 0.4.17.1 and Python 3.6.5.
I have replaced the mcpipy files as you indicated in your post quoted above, but the mod fails to load with the following error, and as a result, I cannot even test the Python scripts.
So how do I fix this error and proceed
Code: Select all
secure.trusted_mods = raspberryjammod
Don't touch this setting! Mod security should never be disabledcvincross wrote:have you added "secure.enable_security = true" to your minetest.conf? That is what fixed that error for me.
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
My mistake...so specifying this as "true" worked on one machine (oddly)... on another machine it only works with security disabled... which is a BAD idea for sure... but with security enabled I get a "require() is disabled" message. any ideas how to get around that?rubenwardy wrote:add this to minetest.conf:GRudolph wrote:@jocsamazon
I would like to know what specific changes you made in order to run minetest with raspberryjammod?
I am running Windows 10, Minetest 0.4.17.1 and Python 3.6.5.
I have replaced the mcpipy files as you indicated in your post quoted above, but the mod fails to load with the following error, and as a result, I cannot even test the Python scripts.
So how do I fix this error and proceed
Code: Select all
secure.trusted_mods = raspberryjammod
Don't touch this setting! Mod security should never be disabledcvincross wrote:have you added "secure.enable_security = true" to your minetest.conf? That is what fixed that error for me.
This is on the latest 5.0.0dev on linux.
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
Again...my mistake... I just confirmed I can't get either machine to work with security turned on... so both return the error about require() being disabled by security. Any help would be appreciated. Does turning off security pose a serious security risk if it is being used as a self hosted single player session - ie without the server enabled?cvincross wrote:My mistake...so specifying this as "true" worked on one machine (oddly)... on another machine it only works with security disabled... which is a BAD idea for sure... but with security enabled I get a "require() is disabled" message. any ideas how to get around that?rubenwardy wrote:add this to minetest.conf:GRudolph wrote:@jocsamazon
I would like to know what specific changes you made in order to run minetest with raspberryjammod?
I am running Windows 10, Minetest 0.4.17.1 and Python 3.6.5.
I have replaced the mcpipy files as you indicated in your post quoted above, but the mod fails to load with the following error, and as a result, I cannot even test the Python scripts.
So how do I fix this error and proceed
Code: Select all
secure.trusted_mods = raspberryjammod
Don't touch this setting! Mod security should never be disabledcvincross wrote:have you added "secure.enable_security = true" to your minetest.conf? That is what fixed that error for me.
This is on the latest 5.0.0dev on linux.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
You need to change `require` this:
Code: Select all
local old_require = require
require = ie.require
local socket = require("socket")
-- any other sockets
require = old_require
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
Ok, I am probably doing this wrong... but I made the above change to the init.lua of the mod and I'm not getting it to work. Am I wrapping just the socket "requires" with this redefinition or all of them? - there are three others that are not "sockets" sprinkled throughout the script. I'm not really clear on what this is accomplishing though...since the calls are already ie.require before I redefine require to be ie.require. please excuse my ignorance. Anyway... when I do this I end up with an error about attempting to index a nil value for "ie" - the same error I get if I don't include the mod in secure.trusted_modsrubenwardy wrote:You need to change `require` this:
Code: Select all
local old_require = require require = ie.require local socket = require("socket") -- any other sockets require = old_require
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
[Can't connect to server--SOLVED]
Hi, I am trying to apply this great mod to python programming education, and I think I would be fun with multi-player.
I have tested this mod on linux Ubuntu 18.04 with single-player and multi-player on the same machine.
But I have some problem with multi-player on different machines. I have a PC and a laptop both running Ubuntu 18.04 and both can run this mod in single-player mode.
Now I have PC as server and laptop as client, laptop can connect to server and play the game, but cannot use the mcpi api to connect to server.
If I enter the following in the laptop python ternimal:
I get an error:
Is there anything I have done wrong? Dose anyone successfully tried this mod on different machines playing multi-player?
Oh, forgot to mention, I using Minetest 0.4.16, lua5.1
----------------
[edit]:
now I have solved the above problem:
the right way is to set in the settings.conf file(already set to false by default)
and do this on the client terminal:
notice:
there are some differences between the links below, I don't know which is newer. my test is done with git cloning the 2nd link, and extracted the raspberryjammod folder. exporting MINECRAFT_PLAYER_NAME in ternimal might not be working with the source code in the 1st link.
https://github.com/arpruss/raspberryjam ... t/releases
https://github.com/arpruss/raspberryjammod-minetest
now It is fully functional even in multi-player mode on linux(ubuntu)! thanks again to the author!
Hi, I am trying to apply this great mod to python programming education, and I think I would be fun with multi-player.
I have tested this mod on linux Ubuntu 18.04 with single-player and multi-player on the same machine.
But I have some problem with multi-player on different machines. I have a PC and a laptop both running Ubuntu 18.04 and both can run this mod in single-player mode.
Now I have PC as server and laptop as client, laptop can connect to server and play the game, but cannot use the mcpi api to connect to server.
If I enter the following in the laptop python ternimal:
Code: Select all
mc = Minecraft(connection=Connection("192.168.1.90",30000)) # try connecting to server
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "connection.py", line 37, in __init__
self.socket.connect((address, port))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 111] Connection refused
Oh, forgot to mention, I using Minetest 0.4.16, lua5.1
----------------
[edit]:
now I have solved the above problem:
Code: Select all
mc = Minecraft(connection=Connection("192.168.1.90",30000))
# this is wrong way to connect to the api server, which is on a defferent port(default to 4711) than the minetest server
Code: Select all
restrict_to_local_connections = false
and do this on the client terminal:
Code: Select all
export MINECRAFT_API_HOST='your server address'
export MINECRAFT_PLAYER_NAME='your player name'
there are some differences between the links below, I don't know which is newer. my test is done with git cloning the 2nd link, and extracted the raspberryjammod folder. exporting MINECRAFT_PLAYER_NAME in ternimal might not be working with the source code in the 1st link.
https://github.com/arpruss/raspberryjam ... t/releases
https://github.com/arpruss/raspberryjammod-minetest
now It is fully functional even in multi-player mode on linux(ubuntu)! thanks again to the author!
-
- Member
- Posts: 249
- Joined: Wed Jul 26, 2017 18:10
- In-game: zargul
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
rubenwardy wrote:add this to minetest.conf:GRudolph wrote:@jocsamazon
I would like to know what specific changes you made in order to run minetest with raspberryjammod?
I am running Windows 10, Minetest 0.4.17.1 and Python 3.6.5.
I have replaced the mcpipy files as you indicated in your post quoted above, but the mod fails to load with the following error, and as a result, I cannot even test the Python scripts.
So how do I fix this error and proceed
Code: Select all
secure.trusted_mods = raspberryjammod
Don't touch this setting! Mod security should never be disabledcvincross wrote:have you added "secure.enable_security = true" to your minetest.conf? That is what fixed that error for me.
Still getting the le nil value error. Using 0.4.17
May God be with you, always.
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
doesn't work for me either, so I just set security to falsezargulthewizard wrote:rubenwardy wrote:add this to minetest.conf:GRudolph wrote:@jocsamazon
I would like to know what specific changes you made in order to run minetest with raspberryjammod?
I am running Windows 10, Minetest 0.4.17.1 and Python 3.6.5.
I have replaced the mcpipy files as you indicated in your post quoted above, but the mod fails to load with the following error, and as a result, I cannot even test the Python scripts.
So how do I fix this error and proceed
Code: Select all
secure.trusted_mods = raspberryjammod
Don't touch this setting! Mod security should never be disabledcvincross wrote:have you added "secure.enable_security = true" to your minetest.conf? That is what fixed that error for me.
Still getting the le nil value error. Using 0.4.17
-
- Member
- Posts: 249
- Joined: Wed Jul 26, 2017 18:10
- In-game: zargul
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
That fixes it?
May God be with you, always.
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
yeszargulthewizard wrote:That fixes it?
-
- Member
- Posts: 249
- Joined: Wed Jul 26, 2017 18:10
- In-game: zargul
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
Well...
I don't really play online...rubenwardy wrote: Don't touch this setting! Mod security should never be disabled
Or use any really risky mods...rubenwardy wrote: Mod security should never be disabled
rubenwardy wrote: never be disabled
May God be with you, always.
-
- Member
- Posts: 249
- Joined: Wed Jul 26, 2017 18:10
- In-game: zargul
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
I disabled it. The good news is the ie nil value error is gone. The bad news is during server creation Minetest crashed completely with no error report or anything.
May God be with you, always.
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
Anyone could explain how to install this mod on debian buster?
Thank you
Thank you
-
- New member
- Posts: 4
- Joined: Tue May 05, 2020 02:52
- GitHub: acs
- IRC: acs
- In-game: ElasticExplorer
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
Just drop in ".minetest/mods" the folder https://github.com/arpruss/raspberryjam ... erryjammod
Then you need to activate it in your world mods config.
I have installed it in Fedora 32 and it is working nicely (at least the API that I have needed). I have needed to install the package "lua-socket-compat.x86_64" so this Lua 5.1 code runs in the 5.3 version that comes with Fedora 32. Good luck!
- JavierCantu
- New member
- Posts: 5
- Joined: Fri Oct 30, 2020 23:48
- GitHub: javier-cantu
Re: [Mod] Raspberry PI MC API for Python code [raspberryjamm
Bro I'm a complete noob, I can't understand how to install this and run Python scripts.acs wrote: ↑Tue May 05, 2020 02:59Just drop in ".minetest/mods" the folder https://github.com/arpruss/raspberryjam ... erryjammod
Then you need to activate it in your world mods config.
I have installed it in Fedora 32 and it is working nicely (at least the API that I have needed). I have needed to install the package "lua-socket-compat.x86_64" so this Lua 5.1 code runs in the 5.3 version that comes with Fedora 32. Good luck!
Can you guide me?
-
- Member
- Posts: 249
- Joined: Wed Jul 26, 2017 18:10
- In-game: zargul
Re: [Mod] Raspberry PI MC API for Python code [raspberryjammod]
I know python, and I couldn't get it to run at all, which was disappointing. :(
May God be with you, always.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 47 guests