-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Description
Hi there,
I'm using enterprise gateway on our kubernetes cluster (following this instructions).
Using a python notebook (in my case the kernel is elyra/kernel-spark-py:dev
) I found the problem, that I cannot use variables inside a function definition, which are defined outside.
Example:
a = 123
def fun():
print(a)
fun()
ends in:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/local/bin/kernel-launchers/python/scripts/launch_ipykernel.py in <module>
4 print(a)
5
----> 6 fun()
/usr/local/bin/kernel-launchers/python/scripts/launch_ipykernel.py in fun()
2
3 def fun():
----> 4 print(a)
5
6 fun()
NameError: name 'a' is not defined
Same with import...
Any ideas?