Closed pmelanson closed 5 years ago
@pmelanson -- thanks for the PR!
It looks like sender
is only set when running in a notebook but gets called in the delete methods regardless of whether display is in the notebook or not, so this is definitely a bug.
@BruceSherwood -- would it be better to fix this by setting sender
to something appropriate in the no-notebook case or by changing the logic at https://github.com/BruceSherwood/vpython-jupyter/blob/master/vpython/vpython.py#L303 and similar?
It looks like a global sender = None
was removed in 417b237c86cd0db4d5bb1daaabc9ba94aac406b9
I honestly don't know, Matt. I think that the del code has not been really tested.
I'm going to go ahead and merge this...in a moment I'll push a fix to the errors.
I'll also start a file with a list of contributors and add @pmelanson to it -- thanks again for this fix!
Thanks Matt!
The code in this PR is slightly different from the diff I posted in the google groups discussion, to take into account changes that came into master from
mwcraig/this-will-be-the-one
.The code still works, however this code may have uncovered a minor bug in the vpython-glowscript communication logic. Specifically, now that I don't call
os._exit(0)
, it seems the following__del__
functions get called that weren't getting called before and throw exceptions on vpython exit:I poked around a little to try and get these errors to go away, but I didn't want to randomly poke even more vpython internals. It looks to be a simple change to squash this error, I just don't know what the change should be.
Thanks for looking at this PR Matt!