Not 100% sure the technical explanation, but apparently passing a closed file to GifLabel.load() as the back_image parameter causes some problems. The load function will complete fine, but for some reason or another the self.frames object will just be an empty array. As a result, self.frames_ that is generated from the cycle class will look a bit weird, and when we go to call next(self.frames_) in the GifLabel.next_frame method, an exception is thrown. This causes the whole popup process to fail and no image to be displayed.
tl;dr: moving resized_image.close() from line 303 where it is currently to line 375 instead resolves the issue. would be happy to submit a pull request if added with no approval to merge.
See title for description.
Steps to reproduce:
After some troubleshooting, it appears that this line is the source of the issue: https://github.com/PetitTournesol/Edgeware/commit/dfb39535b730c94ab9a123df47e8aae5c3a88335#diff-10f8dad5d7af5b7ef7514f81ae610c0c83975b52e2d0c78841a9cc7f8e8b774cR303
Not 100% sure the technical explanation, but apparently passing a closed file to GifLabel.load() as the
back_image
parameter causes some problems. Theload
function will complete fine, but for some reason or another theself.frames
object will just be an empty array. As a result,self.frames_
that is generated from thecycle
class will look a bit weird, and when we go to callnext(self.frames_)
in theGifLabel.next_frame
method, an exception is thrown. This causes the whole popup process to fail and no image to be displayed.tl;dr: moving
resized_image.close()
from line303
where it is currently to line375
instead resolves the issue. would be happy to submit a pull request if added with no approval to merge.