jazz icon indicating copy to clipboard operation
jazz copied to clipboard

scl.from_table() fails

Open naturallymitchell opened this issue 5 years ago • 3 comments

local inspect = require ("inspect")
tbl = (inspect(torchbear.settings))
print(tbl)
ytbl = yaml.from_table(tbl)
print(ytbl)
stbl = scl.from_table(tbl)
print(stbl)

gives

{
  init = "init.lua"
}
---
"{\n  init = \"init.lua\"\n}"
2018-12-05 10:29:28 ERROR: 	error converting Lua string to table
stack traceback:
	[C]: in field 'from_table'
	init.lua:6: in local 'init_f'
	[string "?"]:5: in function <[string "?"]:1>
	[C]: in function 'xpcall'
	[string "?"]:1: in main chunk
2018-12-05 10:29:28 ERROR: 	No handler specified

naturallymitchell avatar Dec 05 '18 18:12 naturallymitchell

the test worked:

local x = {
        x=0,
        y=true,
        z="a\nb",
        a=1.2,
        b={c=1},
        d={day=1,month=2,year=2018},
        e={2, 3, 4},
        }
local s = scl.from_table(x)
print(s)

gave

a=1.2
b={c=1,}
d=2018-02-01
e=[2,3,4,]
x=0
y=true
z="""a
b"""

2018-12-05 10:32:38 ERROR: 	No handler specified

the only difference looks like the {} wrapper but it looks ready to use!

naturallymitchell avatar Dec 05 '18 18:12 naturallymitchell

Is it still failing for you?

dariusc93 avatar Dec 12 '18 01:12 dariusc93

everyone's updating their apps and mp is using it even more. I must've tested poorly

naturallymitchell avatar Dec 12 '18 02:12 naturallymitchell