avalon60/ctk_theme_builder

mac os not working

rennoun opened this issue · 4 comments

it gives always this error whatever the file and the path are correct

anass@MacBook-Pro-de-anass-90 ~ % python3 theme_builder_setup.py -i /Users/anass -p ctk_theme_builder-develop.zip
Checking Python interpreter version...
Python version, 3.11.8, is a supported version.
Starting CTk Theme Builder deployment.
Installation base location: /Users/anass
Creating application home: /Users/anass/ctk_theme_builder

======================== KEY LOCATION MAPPINGS ==========================
Package Location: /Users/anass/ctk_theme_builder-develop.zip
App Home = /Users/anass/ctk_theme_builder
Assets Location = /Users/anass/ctk_theme_builder/assets
User Theme Location = /Users/anass/ctk_theme_builder/user_themes
Log Location = /Users/anass/ctk_theme_builder/log

Creating application assets location: /Users/anass/ctk_theme_builder/assets
Creating application assets location: /Users/anass/ctk_theme_builder/log
Creating application temp location: /Users/anass/ctk_theme_builder/tmp
Creating application data location: /Users/anass/ctk_theme_builder/assets/data
Creating user themes location: /Users/anass/ctk_theme_builder/user_themes
Checking for repository: /Users/anass/ctk_theme_builder/assets/data/ctk_theme_builder.db
Greenfield installation - creating a new repository.
Unpacking package: /Users/anass/ctk_theme_builder-develop.zip to: /Users/anass
[unpack_package] WARNING: Artefact file, ctk_theme_builder-develop.zip, appears to be an invalid ZIP file.
Traceback (most recent call last):
File "/Users/anass/theme_builder_setup.py", line 567, in
unpack_package(zip_pathname=package_path, install_location=install_location)
File "/Users/anass/theme_builder_setup.py", line 427, in unpack_package
with ZipFile(zip_pathname, 'r') as archive:
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/zipfile.py", line 1286, in init
self.fp = io.open(file, filemode)
^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'ctk_theme_builder-develop.zip'
anass@MacBook-Pro-de-anass-90 ~ %

Hi @rennoun . You need to put the full pathname to the ZIP file. Also the ZIP file name is unusual. Did you rename it?

Typically:

From a terminal window:

brew install python
brew install python-tk

If Python is already installed (including Tkinter) , then ignore the above.

Download https://github.com/avalon60/ctk_theme_builder/releases/download/v3.0.1/ctk_theme_builder-3.0.1.zip

Unpack the theme_builder_setup.py file and run it. Assuming you have unpacked it and placed it in your Downloads directory:

cd $HOME/Downloads

python3 theme_builder_setup.py -i /Users/anass -p $HOME/Downloads/ctk_theme_builder-3.0.1.zip

PS: If you are installing to your current login home directory, you can skip the -i option:

python3 theme_builder_setup.py -p $HOME/Downloads/ctk_theme_builder-3.0.1.zip

Please let me know how you get on. I am only just getting my notes together for better MacOS documentation.

same problem :

anass@MacBook-Pro-de-anass-90 ctk_theme_builder % python3 theme_builder_setup.py -i /Users/anass -p /Downloads/ctk_theme_builder-3.0.1.zip
Checking Python interpreter version...
Python version, 3.11.8, is a supported version.
ERROR: Cannot locate the specified package ZIP file: /Downloads/ctk_theme_builder-3.0.1.zip
Traceback (most recent call last):
File "/Users/anass/Downloads/ctk_theme_builder/theme_builder_setup.py", line 493, in
lprint(f'ERROR: Cannot locate the specified package ZIP file: {package_path}')
File "/Users/anass/Downloads/ctk_theme_builder/theme_builder_setup.py", line 50, in lprint
LOG_FILE.write(f'{output_text}\n')
^^^^^^^^
NameError: name 'LOG_FILE' is not defined
anass@MacBook-Pro-de-anass-90 ctk_theme_builder %

Hi @rennoun. You appear to have entered a bad pathname for the Downloads location:

python3 theme_builder_setup.py -i /Users/anass -p /Downloads/ctk_theme_builder-3.0.1.zip # wrong

It should be:

python3 theme_builder_setup.py -i /Users/anass -p $HOME/Downloads/ctk_theme_builder-3.0.1.zip

thank you so much that works very well