Closed bryaan closed 1 year ago
Sounds weird! I can't think of anything to suggest other than reduce it to a MWE.
I still have the code, may try that. But I worked around it by making the main program loop in julia. Now it occurs to me having the main loop in python may be an anti-pattern for this lib. It also has the disadvantage of making stack traces very long and deep in the pythoncall chain.
Yea I figured it out, was simply not putting global in front of a variable. Strange how the bug presented itself though. Maybe the julia devs will want to improve the warning system for that.
Affects: PythonCall
I don't have the ability to post the exact code that causes this to break. However it is a very strange issue that seems to be due to this library. I am using julia 1.9.0.
In the following code for some reason not all variables will be available in the callback. Changing the order of declaration doesn't seem to affect it. Nor does making the variable a global. The issue happens consistently and I'm not sure what can be done to debug.