Newbie Tutorial Error Question
-
- Posts: 36
- Joined: 09 Apr 2020
Can anyone help me with this error I keep getting while working thru the RE tutorial. I've check online and can't really understand where the problem is. Again I'm new so it's it's really simple I apologize in advance. Here's the messaging I keep getting.
RE2DRender 1.6.5d2
OS says system has 8 logical cores
Deleting Intermediate folder
Deleting Output folder
Reading device_2D.lua
Traceback (most recent call last):
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/RE2DRenderStart.py", line 48, in RE2DRender
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Process2DGUI.py", line 266, in Process2DGUI
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Device2D.py", line 527, in ReadAndValidateDevice2DDefFromDir
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Device2D.py", line 345, in ReadDevice2DFromDirAndMakeFlat
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Device2D.py", line 241, in ReadDevice2DPanelDefs
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/JBoxLua.py", line 13, in RunLuaGetGlobals
File "lupa/_lupa.pyx", line 280, in lupa._lupa.LuaRuntime.execute
File "lupa/_lupa.pyx", line 1295, in lupa._lupa.run_lua
lupa._lupa.LuaSyntaxError: error loading code: [string "<python>"]:1: unexpected symbol near '{'
RE2DRender 1.6.5d2
OS says system has 8 logical cores
Deleting Intermediate folder
Deleting Output folder
Reading device_2D.lua
Traceback (most recent call last):
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/RE2DRenderStart.py", line 48, in RE2DRender
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Process2DGUI.py", line 266, in Process2DGUI
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Device2D.py", line 527, in ReadAndValidateDevice2DDefFromDir
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Device2D.py", line 345, in ReadDevice2DFromDirAndMakeFlat
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/Device2D.py", line 241, in ReadDevice2DPanelDefs
File "/scm/Projects/RE2D/RE2DRender/Dev/Source/JBoxLua.py", line 13, in RunLuaGetGlobals
File "lupa/_lupa.pyx", line 280, in lupa._lupa.LuaRuntime.execute
File "lupa/_lupa.pyx", line 1295, in lupa._lupa.run_lua
lupa._lupa.LuaSyntaxError: error loading code: [string "<python>"]:1: unexpected symbol near '{'
-
- RE Developer
- Posts: 115
- Joined: 14 Nov 2018
Looks like some kind of syntax error. If you don't figure it out yourself, can you post the device_2D.lua file?
-
- Posts: 36
- Joined: 09 Apr 2020
Here is the device_2D.lua file. I still don't understand where the error is. Thanks for the help.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 791
- Joined: 09 Dec 2016
Can't say for certain but how sensitive is the syntax requirements?
Bg = {
{ path = "Panel_Front_1U" },
},
lamp = {
offset = { 1000, 150 },
{path = "Lamp_02_2frames", frames = 2}
},
}
back = {
Bg = {
{ path = "Panel_Back_1U" },
},
Placeholder = {
offset = { 100, 100 },
{path = "Placeholder"}
},
}
You are not leaving a space after the open in a few sections, and if it is that sensitive you will also need to add space to the close on those two lines as well.
front = {lupa._lupa.LuaSyntaxError: error loading code: [string "<python>"]:1: unexpected symbol near '{'
Bg = {
{ path = "Panel_Front_1U" },
},
lamp = {
offset = { 1000, 150 },
{path = "Lamp_02_2frames", frames = 2}
},
}
back = {
Bg = {
{ path = "Panel_Back_1U" },
},
Placeholder = {
offset = { 100, 100 },
{path = "Placeholder"}
},
}
You are not leaving a space after the open in a few sections, and if it is that sensitive you will also need to add space to the close on those two lines as well.
-
- Posts: 36
- Joined: 09 Apr 2020
Here's the crazy thing. The code that's in the file is copy/paste from the code in the tutorial section. It isn't hand typed. But I will add some spaces to see if that fixes it.Billy wrote: ↑05 Aug 2020Can't say for certain but how sensitive is the syntax requirements?
front = {lupa._lupa.LuaSyntaxError: error loading code: [string "<python>"]:1: unexpected symbol near '{'
Bg = {
{ path = "Panel_Front_1U" },
},
lamp = {
offset = { 1000, 150 },
{path = "Lamp_02_2frames", frames = 2}
},
}
back = {
Bg = {
{ path = "Panel_Back_1U" },
},
Placeholder = {
offset = { 100, 100 },
{path = "Placeholder"}
},
}
You are not leaving a space after the open in a few sections, and if it is that sensitive you will also need to add space to the close on those two lines as well.
-
- Posts: 36
- Joined: 09 Apr 2020
Just added the spaces and am still getting the error. And again this is the code directly from the Tutorial page previously hand typed and now copy/paste. Still same error message.
-
- Posts: 791
- Joined: 09 Dec 2016
Are you just try to build an example or are you using example code in a custom build.
Have you successfully built an example to see if your build environment works?
As I say I'm no expert
Have you successfully built an example to see if your build environment works?
As I say I'm no expert
-
- Posts: 36
- Joined: 09 Apr 2020
I did the first example before diving into this section just to make sure the code would work on my laptop and it did. I was able to run it in RECON and get sound. So now I'm just going thru the basic tutorial code to see if I can compile it per the included instructions. I'm not at the point yet where I can build an original RE yet. And all the files I'm using are included in the latest version of the SDK so I haven't changed anything. The lupa.lupa file that's causing the error is something that's included in the SDK so I haven't altered it at all. I contacted Reason support via email and twitter DM but as we all know they aren't the fastest at response times.
-
- Posts: 791
- Joined: 09 Dec 2016
Well I'm glad to see a Dev section in the forum and would be very interested in giving it a go, but I'm guessing it's going to be quite hard for anyone new to pick up the SDK without support from other more experienced programmers.
I did have a read through the provided example projects and instantly realised that I would need a custom display for at least one concept, and without having access to examples decided against going any further, but this was before "we could talk about it" I was hoping that after the NDA changes there would be a bit more discussion / tutorials available but as of yet there isn't much available for the beginner.
I'm not a total beginner as I learned Nimbus Pascal & Delphi in college many years ago, I've dabbled with scripting languages including a bit of python and also played a bit with C but like I say I'm no expert and it's been years since my last "programming" project as I decided to stop pulling all nighters bashing at a keyboard.
I prefer to turn it on fire up Reason and just make some noise for a few hours now....
But if there are some experts out there I would like to see some RE SDK tutorials. Hint Hint.
Stick with it chi im sure someone will be able to help you out at some point, and good luck.
I did have a read through the provided example projects and instantly realised that I would need a custom display for at least one concept, and without having access to examples decided against going any further, but this was before "we could talk about it" I was hoping that after the NDA changes there would be a bit more discussion / tutorials available but as of yet there isn't much available for the beginner.
I'm not a total beginner as I learned Nimbus Pascal & Delphi in college many years ago, I've dabbled with scripting languages including a bit of python and also played a bit with C but like I say I'm no expert and it's been years since my last "programming" project as I decided to stop pulling all nighters bashing at a keyboard.
I prefer to turn it on fire up Reason and just make some noise for a few hours now....
But if there are some experts out there I would like to see some RE SDK tutorials. Hint Hint.
Stick with it chi im sure someone will be able to help you out at some point, and good luck.
-
- RE Developer
- Posts: 555
- Joined: 03 Jan 2019
It looks like an error with Python, it's not getting far enough to be able to give you a line number for the Lua error. From what I can see the Lua looks fine.
Are you on Python 3?
Pro-tip: for script editing you need something that will show up your syntax issues, like Notepad++ or similar
Are you on Python 3?
Pro-tip: for script editing you need something that will show up your syntax issues, like Notepad++ or similar

-
- Posts: 791
- Joined: 09 Dec 2016
I did wonder that myself that I was python, but wasn't sure.Enlightenspeed wrote: ↑12 Aug 2020It looks like an error with Python, it's not getting far enough to be able to give you a line number for the Lua error. From what I can see the Lua looks fine.
Are you on Python 3?
Pro-tip: for script editing you need something that will show up your syntax issues, like Notepad++ or similar![]()
I take it that the syntax is correct in the file provided i.e. The spaces aren't required.
-
- RE Developer
- Posts: 555
- Joined: 03 Jan 2019
Yeah, the whitespace is completely ignored in Lua, assuming it's not internal to a string or cutting a var name in 2 etcBilly wrote: ↑12 Aug 2020I did wonder that myself that I was python, but wasn't sure.Enlightenspeed wrote: ↑12 Aug 2020It looks like an error with Python, it's not getting far enough to be able to give you a line number for the Lua error. From what I can see the Lua looks fine.
Are you on Python 3?
Pro-tip: for script editing you need something that will show up your syntax issues, like Notepad++ or similar![]()
I take it that the syntax is correct in the file provided i.e. The spaces aren't required.

-
- Posts: 791
- Joined: 09 Dec 2016
Is there a good source of information with examples for custom displays.
-
- RE Developer
- Posts: 276
- Joined: 21 Apr 2016
- Location: Las Vegas
All my REs are open source and most of them are using custom displays (the only one not using is A/B Switch). I know it is not a tutorial, but it shows you code that works

https://github.com/pongasoft
Yan
-
- Posts: 791
- Joined: 09 Dec 2016
Thanks for the info.pongasoft wrote: ↑14 Aug 2020All my REs are open source and most of them are using custom displays (the only one not using is A/B Switch). I know it is not a tutorial, but it shows you code that works
https://github.com/pongasoft
Yan
-
- Information
-
Who is online
Users browsing this forum: CommonCrawl [Bot] and 0 guests