The following code snippet
def foo():
def bar():
result = []
result.append("bar")
return result
result = bar()
print(result)
@webhook_trigger("test")
def test():
foo()
fails with
Exception in <file.test.test> line 3:
def bar():
^
NameError: name 'result' is not defined
when triggered.
If I rename the outer variable (in foo()) everything works.
If i remove the append call everything works too.
The same code snippet executed without pyscript works fine.