Norns : load fail (missing "lattice") even after reflashing the card

I’m having trouble launching a specific Norns application (Cheat Codes 2) because it can’t find an included module (“lattice”).

I’m using a Norns Shield (latest no soldering kit from Monome).

The application used to work properly (I launched it at least once without problems). I started an update of all installed scripts on Maiden, went to do something else, did not realize it was maybe still running and switched to another script, which might have been CC2 or not - I’m not certain. At this point something did not go well and I realized I was maybe still doing the update (I’m not 100% sure if the message I had meant that it was in progress or was finished).

All other scripts I’ve tried loaded properly.

I tried removing and reinstalling CC2, manually deleting the files in the code and data folders and even reflashing the whole thing as the Norns is new and I had no important data in there. Surprisingly, that last option did not change anything and I still get the same error - the same files can’t be found/loaded.

The line that triggers the error is :

lattice = require("lattice")

I’m not sure how to reinstall this or why the problem is still present after reflashing the micro SD card.

Any idea of what went wrong and how I could fix this ?

The full log :

# script load: /home/we/dust/code/cheat_codes_2/cheat_codes_2.lua
# cleanup
# script clear
including /home/we/dust/code/cheat_codes_2/lib/cc_pattern_time.lua
including /home/we/dust/code/cheat_codes_2/lib/main_menu.lua
including /home/we/dust/code/cheat_codes_2/lib/encoder_actions.lua
including /home/we/dust/code/cheat_codes_2/lib/arc_actions.lua
including /home/we/dust/code/cheat_codes_2/lib/zilchmos.lua
including /home/we/dust/code/cheat_codes_2/lib/start_up.lua
including /home/we/dust/code/cheat_codes_2/lib/grid_actions.lua
including /home/we/dust/code/cheat_codes_2/lib/easing.lua
including /home/we/dust/code/cheat_codes_2/lib/arp_actions.lua
including /home/we/dust/code/cheat_codes_2/lib/rnd_actions.lua
including /home/we/dust/code/cheat_codes_2/lib/cc_musicutil.lua
including /home/we/dust/code/cheat_codes_2/lib/delay.lua
including /home/we/dust/code/cheat_codes_2/lib/euclid.lua
including /home/we/dust/code/cheat_codes_2/lib/midicheat.lua
including /home/we/dust/code/cheat_codes_2/lib/sharer.lua
including /home/we/dust/code/cheat_codes_2/lib/macros.lua
### SCRIPT ERROR: load fail
/home/we/dust/code/cheat_codes_2/cheat_codes_2.lua:50: module 'lattice' not found:
	no field package.preload['lattice']
	no file '/home/we/norns/lua/lattice.lua'
	no file '/home/we/norns/lua/core/lattice.lua'
	no file '/home/we/norns/lua/core/params/lattice.lua'
	no file '/home/we/norns/lua/lib/lattice.lua'
	no file '/home/we/norns/lua/softcut/lattice.lua'
	no file '/home/we/dust/code/lattice.lua'
	no file '/usr/local/share/lua/5.3/lattice.lua'
	no file '/usr/local/share/lua/5.3/lattice/init.lua'
	no file '/usr/local/lib/lua/5.3/lattice.lua'
	no file '/usr/local/lib/lua/5.3/lattice/init.lua'
	no file '/usr/share/lua/5.3/lattice.lua'
	no file '/usr/share/lua/5.3/lattice/init.lua'
	no file './lattice.lua'
	no file './lattice/init.lua'
	no file '/usr/local/lib/lua/5.3/lattice.so'
	no file '/usr/lib/arm-linux-gnueabihf/lua/5.3/lattice.so'
	no file '/usr/lib/lua/5.3/lattice.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './lattice.so'
stack traceback:
	/home/we/norns/lua/core/norns.lua:138: in function </home/we/norns/lua/core/norns.lua:138>
	[C]: in function 'require'
	/home/we/dust/code/cheat_codes_2/cheat_codes_2.lua:50: in main chunk
	[C]: in function 'dofile'
	/home/we/norns/lua/core/script.lua:191: in function </home/we/norns/lua/core/script.lua:191>
	[C]: in function 'xpcall'
	/home/we/norns/lua/core/norns.lua:139: in field 'try'
	/home/we/norns/lua/core/script.lua:191: in function 'core/script.load'
	/home/we/norns/lua/core/menu/preview.lua:21: in function 'core/menu/preview.key'
	/home/we/norns/lua/core/menu.lua:139: in function </home/we/norns/lua/core/menu.lua:116>

definitely seems like you are not on the latest version somehow. (lattice is a brand new addition.)

but here it is:
[ norns/lattice.lua at main · monome/norns · GitHub ]


can you run SYSTEM > UPDATE?

alternatively, you could shell in and perform git pull from ~/norns on device

(maybe posted disk image has not been updated to latest, thats a question for @tehn / @dan_derks

2 Likes

Ah, I was indeed not on the latest. I had 201202 but SYSTEM/UPDATE found something more recent.

I just installed it and it works now :slight_smile:
Thanks :+1:

1 Like

sorry to hear about the troubles – the posted disk image is not the latest. which instructions were you using to flash? we included updating as the last step in the clean install docs a bit ago, but seems like i missed a more visible set – glad it all got worked out! :slight_smile:

I clearly missed that last step when reinstalling everything.
Thanks for pointing that out :+1:

I should have tried that before flashing the card again, the menu is pretty obvious yet I somehow managed not to notice it…