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.
Post Reply
Chi-Individual
Posts: 386
Joined: 09 Apr 2020

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: 128
Joined: 14 Nov 2018

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: 386
Joined: 09 Apr 2020

05 Aug 2020

Here is the device_2D.lua file. I still don't understand where the error is. Thanks for the help.
Attachments
device_2D.lua.rtf
(1.68 KiB) Downloaded 116 times

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

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.

Chi-Individual
Posts: 386
Joined: 09 Apr 2020

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: 386
Joined: 09 Apr 2020

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.

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

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

Chi-Individual
Posts: 386
Joined: 09 Apr 2020

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.

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

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.

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

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

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

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.

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

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

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

13 Aug 2020

Is there a good source of information with examples for custom displays.

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

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

User avatar
Billy+
Posts: 4157
Joined: 09 Dec 2016

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.

Mattvank
Posts: 363
Joined: 30 Mar 2017

25 Jul 2023

Untitleddsdsds.jpg
Untitleddsdsds.jpg (119.91 KiB) Viewed 4953 times
Hello,

I don´t want to open a new thread. I hope it´s okay. I get this error message. Any idea how i can solve this?

jengstrom
Reason Studios
Posts: 101
Joined: 04 May 2015

03 Aug 2023

@Mattvank: The Visual Studio project files are not set up for launching. When you try to launch, it just ends up invoking the plugin DLL, which can't be run on its own.

You have successfully built the project, so the device should show up in Reason Recon.

If you want to make the project launch from Visual Studio, you can set it up to launch Reason Recon.

Project properties -> select which configuration(s) you want to change in the drop downs at the top, go to the debugging page -> command field and enter the path to Reason Recon.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests