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
What's happening is that lambdify is assuming it is being called from Python, whereas it's actually being called from Julia (and therefore there are no higher stack frames, which is what that line is trying to access). I'm not familiar with sympy but it looks like it's trying to access the variables in the scope where lambdify is being called from. Which is pretty magical and sketchy TBH.
AFAIK this isn't fixable from PythonCall. You've got a couple of options:
Raise an issue (or make a PR) with sympy changing it so that callers_local_vars only gets computed if it is actually needed. In your case it is not needed. This would just be a mild reordering of the logic of that block. Or add a flag to skip that bit of logic - which looks optional anyway.
In your own code, only call lambdify from within a proper Python function.
Affects: PythonCall
Describe the bug
Minimal working example:
Your system
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: