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
Trying to open any NetCDF file, I get this tkinter error:
Traceback (most recent call last):
File "/gpfs/work/-/temp/nc2/venv/bin/nc2", line 8, in <module>
sys.exit(main())
^^^^^^
File "/gpfs/work/-/temp/nc2/venv/lib/python3.12/site-packages/nc2/nc2.py", line 1367, in main
root = tb.Window(themename='darkly')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gpfs/work/-/temp/nc2/venv/lib/python3.12/site-packages/ttkbootstrap/window.py", line 231, in __init__
self._icon = tkinter.PhotoImage(master=self, data=Icon.icon)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/apps/shared/taifun/x86_64/apps/DATAPROCESSING/python/3.12.7/system/lib/python3.12/tkinter/__init__.py", line 4162, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "/apps/shared/taifun/x86_64/apps/DATAPROCESSING/python/3.12.7/system/lib/python3.12/tkinter/__init__.py", line 4109, in __init__
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize image data
This is clearly not caused by NC2 code, but by tkinter and/or ttkbootstrap. A quick search points to a TCL version issue, apparently requiring at least TCL 8.6:.
The reason for this is the limited image format support of TCL, as discussed here. And although Pillow is a NC2 dependency, it does not resolve this issue. Is seems that only upgrading from my TCL 8.5 to >=8.6 would help, but this requires admin rights.
A way to reproduce this error, or to confirm the correct functioning
fromtkinterimport*root=Tk()
canv=Canvas(root, width=80, height=80, bg='white')
canv.grid(row=2, column=3)
img=PhotoImage(data=Icon.warning) # It fails here alreadycanv.create_image(20,20, anchor=NW, image=img)
mainloop()
The text was updated successfully, but these errors were encountered:
Trying to open any NetCDF file, I get this
tkinter
error:This is clearly not caused by NC2 code, but by tkinter and/or ttkbootstrap. A quick search points to a TCL version issue, apparently requiring at least TCL 8.6:.
The reason for this is the limited image format support of TCL, as discussed here. And although
Pillow
is a NC2 dependency, it does not resolve this issue. Is seems that only upgrading from my TCL 8.5 to >=8.6 would help, but this requires admin rights.A way to reproduce this error, or to confirm the correct functioning
The text was updated successfully, but these errors were encountered: