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
Issue with Variable Scope in Python within Generator Expressions #388
I am facing an issue in Python where variables within generator expressions (such as all(...) or list comprehensions) are not accessible unless declared globally. For instance, in all(row[column] == fieldData for row in eventsList), both column and eventsList are not accessible in that context, resulting in the exception: name 'eventsList' is not defined. Does anyone know how to solve this without declaring the variables globally?
I am facing an issue in Python where variables within generator expressions (such as all(...) or list comprehensions) are not accessible unless declared globally. For instance, in all(row[column] == fieldData for row in eventsList), both column and eventsList are not accessible in that context, resulting in the exception: name 'eventsList' is not defined. Does anyone know how to solve this without declaring the variables globally?
Activity
frikky commentedon Dec 12, 2024
Hey!
Is this in the Execute Python function, Liquid or with a custom app?
It indeed must have something to do with local vs global scopes if the execute python function 🤔
melv33n commentedon Dec 13, 2024
It's in Execute Python Function inside Shuffle-tools app
frikky commentedon Dec 17, 2024
@0x0elliot can you look into this? Very relevant to the code editor work