Page 1 of 1

ERROR: ModError: Failed to load and run /mod_directory/init.

PostPosted: Tue Dec 09, 2014 22:13
by Merlin
[Somehow I cannot edit the subject anymore, the error goes like "ERROR: ModError: Failed to load and run ~/.minetest/mods/mod/init.lua".]

Hi,
every mod I install fails with the error above when I try to load a server world, but I don't think it's a naming problem because I used the names in the brackets and Minetests recognizes the mods.
I am on Fedora and I use Minetest 4.9.

Examples are the animals, technic and pipeworks mods, which seem to work for everybody else.

This is the Lua Error I get(debug.txt is several thousand lines long, please tell me if I should look out for something specific).
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
23:41:45: ERROR[main]: ========== ERROR FROM LUA ===========
23:41:45: ERROR[main]: Failed to load and run script from
23:41:45: ERROR[main]: /home/glados/.minetest/mods/pipeworks/init.lua:
23:41:45: ERROR[main]: /home/glados/.minetest/mods/pipeworks/compat.lua:4: attempt to call field 'override_item' (a nil value)
23:41:45: ERROR[main]: stack traceback:
23:41:45: ERROR[main]:  /home/glados/.minetest/mods/pipeworks/compat.lua:4: in main chunk
23:41:45: ERROR[main]:  [C]: in function 'dofile'
23:41:45: ERROR[main]:  /home/glados/.minetest/mods/pipeworks/init.lua:124: in main chunk
23:41:45: ERROR[main]: ======= END OF ERROR FROM LUA ========



Can anyone tell me how to fix this?

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Tue Dec 09, 2014 22:34
by kaeza
Hello and welcome!

Have you looked at How to report bugs?

In particular:
PilzAdam wrote:Also add output from debug.txt in the topic (use the [code] tags of BBCode for that):
  • Go to the bin/ directory of your Minetest copy (or ~/.minetest/ in a globally installed Minetest) and delete the existing debug.txt
  • Add "debug_log_level = 4" to minetest.conf
  • Start Minetest and reproduce the bug
  • Close Minetest (if it hasnt crashed already) and copy the contents of the new debug.txt
  • (Remove "debug_log_level = 4" from minetest.conf)

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Tue Dec 09, 2014 22:39
by Merlin
Ahh...sorry I didn't see that one, I will add the information right away, thanks!

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Tue Dec 09, 2014 22:47
by Merlin
Added the Lua Error part of debug.txt.

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Wed Dec 10, 2014 10:46
by kaeza
Ah didn't see you are using 0.4.9.

You should update to 0.4.10, wait a bit for 0.4.11 (to be released in the next days, IIRC), or request the mod author(s) if they can provide a link to a version of the mod that still works in 0.4.9.

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Wed Dec 10, 2014 12:46
by Merlin
I update my System regulary, but yum always tells me, that minetest is up to date. Seems like there is no 0.4.10 for Fedora.

Interestingly, there is 0.4.10 declared in the package database, I'll try to find out why my system refuses to update it.

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Wed Dec 10, 2014 14:37
by Don
The repository is slow to update. This is not Minetest that does this it is the repository maintainers.
Try this.
https://forum.minetest.net/viewtopic.php?f=42&t=3837

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Wed Dec 10, 2014 14:55
by philipbenr
If that doesn't work, there is an easier script. If you git clone everything from github, (including mods) and compile from source with a local install, then there is this script (put this in a .sh file)

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    cd minetest
    start=`pwd`
    for path in `find -name ".git"`; do
      cd $path/..
      echo "updating " $(basename `pwd`)
      git pull
    done

    echo "building updates"
    cd $start
    make -j4 


The last line is for my quad-core laptop, so edit the number to the number of cores you have (or get rid of it if you have more than one).

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Wed Dec 10, 2014 21:04
by Merlin
I compiled it from source and it works so far, thanks for your help. : )

Re: ERROR: ModError: Failed to load and run /mod_directory/i

PostPosted: Wed Dec 10, 2014 21:44
by philipbenr
You're welcome.