ParthJadhav / Tkinter-Designer

An easy and fast way to create a Python GUI 🐍
BSD 3-Clause "New" or "Revised" License
8.63k stars 794 forks source link

Exception: Frame not found in figma file or is empty #367

Closed aglamazlarefe closed 8 months ago

aglamazlarefe commented 8 months ago

Creating Element { name: button, type: group } Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\tkdesigner\designer.py", line 21, in to_code frame = Frame(f, self.figma_file, self.output_path, self.frameCounter) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 30, in init self.create_element(child) File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 51, in create_element download_image(image_url, image_path) File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\tkdesigner\utils.py", line 23, in download_image im = im.resize((im.size[0] // 2, im.size[1] // 2), Image.ANTIALIAS) ^^^^^^^^^^^^^^^ AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Efe Ağlamazlar\AppData\Local\Programs\Python\Python312\Lib\tkinter__init.py", line 1948, in call__ return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\gui\gui.py", line 72, in btn_clicked designer.design() File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\tkdesigner\designer.py", line 32, in design code = self.to_code() ^^^^^^^^^^^^^^ File "C:\Users\Efe Ağlamazlar\Desktop\sp proje\Tkinter-Designer-master\tkdesigner\designer.py", line 23, in to_code raise Exception("Frame not found in figma file or is empty") Exception: Frame not found in figma file or is empty

but my figma design already have a frames please help me Ekran Alıntısı

matheeshapathirana commented 8 months ago

I got the same problem and fixed it by using python 3.10 venv

huzaifa0301 commented 8 months ago

can you help me also @matheeshapathirana

I also face this

I used 3.11 version

aglamazlarefe commented 8 months ago

I solved issue. I changed my pc where am ı running file and it worked fine. I recommend you to change pc or create venv.

barandenizdogan commented 8 months ago

Changing Pc or env is not the solution. Read the Install Instructions carefully. You should do following steps. 1- pip install tkdesigner Thats gonna fix all the problems. Clonnig repo and installing requirements not enough.