Comments (4)
The version of tkinter provided in macOS is probably outdated. If the following code:
import tkinter
print(tkinter.TkVersion)
gives anything below 8.6
, you should update it somehow. There instructions on it on the internet.
from ttkbootstrap.
Alright.
So I did update tkinter to 8.6 following this answer: https://stackoverflow.com/a/61879759
Done these steps:
brew install tcl-tk
export PATH="/usr/local/opt/tcl-tk/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/tcl-tk/lib"
export CPPFLAGS="-I/usr/local/opt/tcl-tk/include"
export PKG_CONFIG_PATH="/usr/local/opt/tcl-tk/lib/pkgconfig"
brew reinstall python
make sure version is updated:
brew info tcl-tk
Then created new environment
python3 -m venv myenv
Activate it
source myenv/bin/activate
and run the *.py test file with:
import tkinter
print(tkinter.TkVersion)
So, I moved my projects files into the new environment and issue with not recognizing image data was solved.
Thank you @rdbende for showing which way to dig =)
from ttkbootstrap.
Yup, same issue here.
Possibly any solutions?
Traceback (most recent call last):
File "/Users/{user}/Documents/{app}/main.py", line 472, in
root = ttk.Window(themename="journal") # Create a new window with the "journal" theme
File "/Users/{user}/Documents/{app}/venv/lib/python3.9/site-packages/ttkbootstrap/window.py", line 231, in init
self._icon = tkinter.PhotoImage(master=self, data=Icon.icon)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/init.py", line 4064, in init
Image.init(self, 'photo', name, cnf, master, **kw)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/init.py", line 4009, in init
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize image data
It works on Win10, as well
from ttkbootstrap.
The version of tkinter provided in macOS is probably outdated. If the following code:
import tkinter print(tkinter.TkVersion)gives anything below
8.6
, you should update it somehow. There instructions on it on the internet.
Appreciate your response. indeed, it is 8.5. I'll work on updating it
from ttkbootstrap.
Related Issues (20)
- Bug(widget.py): Line 856 - Image.CUBIC doesn't exist anymore, should be replaced with Image.Resampling.BICUBIC HOT 1
- Querybox.get_color Not Work
- Python 3.11 errors out on using Meter HOT 3
- bgerror failed to handle background error
- module 'PIL.Image' has no attribute 'CUBIC'. Did you mean: 'BICUBIC'? HOT 3
- Tableview build_table_data,width aotu changed
- Checkbutton silently quits application (no exception log) HOT 5
- Floodgauge not showing text
- Adding Button to TabelView
- Calendar doesn't pop up
- ModuleNotFoundError when importing ttkbootstrap on Win 11 & python 3.10.10
- Widgets look change when opening new window with different theme
- Error: line 595, in theme_use raise TclError(themename, "is not a valid theme.") I have messed up the themes and try to reinstall ttkbootstrap to start fresh but........
- Support for custom widget classes?
- child Window Don't can use meter HOT 1
- cannot use configure() to change style of widgets
- Treeview adjusts the style of the expand button
- ttkcreator don’t work HOT 1
- enter title of bug here HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ttkbootstrap.