jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

Reload image bug #585

Closed petrzhu closed 4 years ago

petrzhu commented 5 years ago

Bug Report


Context


Upon using reloadImage method, Python returns the error

Expected Behaviour


Image widget should be reloaded.

Actual Behaviour


Error.

Any error messages produced by appJar


File "C:\Path\To\Python\Python37-32\lib\site-packages\appJar\lib\tkinter_png.py", line 116, in convert row = row.tolist() #convert from array to list AttributeError: 'list' object has no attribute 'tolist'

Sample code, demonstrating the issue


app.addImage("q", "./q.png")

and then via using thread function app.reloadImage("q", "./q.png")

Version Information


appJar: 0.94.0 Python: 3.7.3 TCL: 8.6, TK: 8.6 Platform: Windows pid: 4900 locale: en_US

And also I attach the way I fixed this issue which works currently: since the 'row' object in file tkinter_png.py is already a list, I just commented out this line and everything works as it should be.

jarvisteach commented 4 years ago

I'm unable to reproduce this in my Mac, I wonder if it is something particular to the image you used?

Could you post a link to the image?

jarvisteach commented 4 years ago

Interestingly, having upgraded the version of pypng (#595) I'm now seeing this issue. So, I'll add in a try/except around that code, so if it cannot be converted to a list, it will continue as is...

jarvisteach commented 4 years ago

I've included the mentioned fix in tkinter_png