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
Describe the bug
Passing functions to Julia as global variables is buggy
>>> from juliacall import Main
>>> Main.x =5
>>> Main.x # Fine
5
>>> deff(y):
... return y +1
...
>>> Main.f = f
>>> Main.f # Bad
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/x/.julia/packages/PythonCall/qTEA1/src/jlwrap/any.jl", line 195, in __getattr__
return self._jl_callmethod($(pyjl_methodnum(pyjlany_getattr)), k)
^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: <built-in method _jl_callmethod of ModuleValue object at 0x103dc7a00> returned NULL without setting an exception
>>> Main.z =7
>>> Main.z
7
>>> Main.f # Very bad
7
>>> Main.x
5
The text was updated successfully, but these errors were encountered:
Affects: JuliaCall
Describe the bug
Passing functions to Julia as global variables is buggy
The text was updated successfully, but these errors were encountered: