You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NameError with inner functions and variable shadowing #683
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.
Activity
craigbarratt commentedon Jan 17, 2025
Whoa - definitely a bug. Thanks for reporting.
rtimush commentedon Jan 17, 2025
Wow, that was quick!
fixes custom-components#683
craigbarratt commentedon Jan 18, 2025
Thanks for reducing it to a simple example and providing a succinct bug report.