Newbie Tutorial Error Question

This forum is for developers of Rack Extensions to discuss the RE SDK, share code, and offer tips to other developers.
Chi-Individual
Posts: 14
Joined: 09 Apr 2020

Post 04 Aug 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 '{'

ForgottenClank
RE Developer
Posts: 111
Joined: 14 Nov 2018

Post 05 Aug 2020

Looks like some kind of syntax error. If you don't figure it out yourself, can you post the device_2D.lua file?

Chi-Individual
Posts: 14
Joined: 09 Apr 2020

Post 05 Aug 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.

Billy
Posts: 331
Joined: 09 Dec 2016

Post 05 Aug 2020

Can't say for certain but how sensitive is the syntax requirements?
lupa._lupa.LuaSyntaxError: error loading code: [string "<python>"]:1: unexpected symbol near '{'
front = {
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.
:ignition: :reason: :refill: :re: :rebirth: :PUF_figure: :nektar: :mac: :EiEPro: :Alesis Mk2:

Chi-Individual
Posts: 14
Joined: 09 Apr 2020

Post 05 Aug 2020

Billy wrote:
05 Aug 2020
Can't say for certain but how sensitive is the syntax requirements?
lupa._lupa.LuaSyntaxError: error loading code: [string "<python>"]:1: unexpected symbol near '{'
front = {
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.
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.

Chi-Individual
Posts: 14
Joined: 09 Apr 2020

Post 05 Aug 2020

Billy wrote:
05 Aug 2020
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.
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.

Billy
Posts: 331
Joined: 09 Dec 2016

Post 05 Aug 2020

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
:ignition: :reason: :refill: :re: :rebirth: :PUF_figure: :nektar: :mac: :EiEPro: :Alesis Mk2:

Chi-Individual
Posts: 14
Joined: 09 Apr 2020

Post 05 Aug 2020

Billy wrote:
05 Aug 2020
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
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.

Billy
Posts: 331
Joined: 09 Dec 2016

Post 05 Aug 2020

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.
:ignition: :reason: :refill: :re: :rebirth: :PUF_figure: :nektar: :mac: :EiEPro: :Alesis Mk2:

User avatar
Enlightenspeed
RE Developer
Posts: 494
Joined: 03 Jan 2019

Post 12 Aug 2020

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 :)

Billy
Posts: 331
Joined: 09 Dec 2016

Post 12 Aug 2020

Enlightenspeed wrote:
12 Aug 2020
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 :)
I did wonder that myself that I was python, but wasn't sure.

I take it that the syntax is correct in the file provided i.e. The spaces aren't required.
:ignition: :reason: :refill: :re: :rebirth: :PUF_figure: :nektar: :mac: :EiEPro: :Alesis Mk2:

User avatar
Enlightenspeed
RE Developer
Posts: 494
Joined: 03 Jan 2019

Post 13 Aug 2020

Billy wrote:
12 Aug 2020
Enlightenspeed wrote:
12 Aug 2020
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 :)
I did wonder that myself that I was python, but wasn't sure.

I take it that the syntax is correct in the file provided i.e. The spaces aren't required.
Yeah, the whitespace is completely ignored in Lua, assuming it's not internal to a string or cutting a var name in 2 etc

:D

Billy
Posts: 331
Joined: 09 Dec 2016

Post 13 Aug 2020

Is there a good source of information with examples for custom displays.
:ignition: :reason: :refill: :re: :rebirth: :PUF_figure: :nektar: :mac: :EiEPro: :Alesis Mk2:

User avatar
pongasoft
RE Developer
Posts: 250
Joined: 21 Apr 2016
Location: Las Vegas

Post 14 Aug 2020

Billy wrote:
13 Aug 2020
Is there a good source of information with examples for custom displays.
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

Billy
Posts: 331
Joined: 09 Dec 2016

Post 14 Aug 2020

pongasoft wrote:
14 Aug 2020
Billy wrote:
13 Aug 2020
Is there a good source of information with examples for custom displays.
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
Thanks for the info.
:ignition: :reason: :refill: :re: :rebirth: :PUF_figure: :nektar: :mac: :EiEPro: :Alesis Mk2:

  • Information
  • Who is online

    Users browsing this forum: CommonCrawl [Bot] and 0 guests