Tkinter-Designer
Tkinter-Designer copied to clipboard
Report bug: Frame not found in figma file or is empty.
- I already double checked the URL, I'm selecting the frame before copying the URL, all elements are named correctly, nothing is hidden, Token is valid, everything.. But every single time I try and use it, it gives me a whole long error with the last line being "Frame not found in figma file or is empty". I've been trying for two days. Please help me someone!
- Windows 10
- Expected Behavior: Successfully create all elements:
It makes one element then fails. Here is the full error I get:
Creating Element { name: image, type: rectangle }
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\lurk\Tkinter-Designer\tkdesigner\designer.py", line 21, in to_code
frame = Frame(f, self.figma_file, self.output_path, self.frameCounter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lurk\Tkinter-Designer\tkdesigner\figma\frame.py", line 29, in init
self.elements = [
^
File "C:\Users\lurk\Tkinter-Designer\tkdesigner\figma\frame.py", line 30, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\lurk\AppData\Local\Programs\Python\Python311\Lib\tkinter_init_.py", line 1948, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\lurk\Tkinter-Designer\gui\gui.py", line 72, in btn_clicked designer.design() File "C:\Users\lurk\Tkinter-Designer\tkdesigner\designer.py", line 32, in design code = self.to_code() ^^^^^^^^^^^^^^ File "C:\Users\lurk\Tkinter-Designer\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
You need to add a frame to your figma file https://help.figma.com/hc/en-us/articles/360039832054-Frames-and-Groups
Create a frame: macOS: Command-Option-G Windows: Control + Alt + G
Then place everything into the frame
Example:
is there a solution to this? I have followed the rules. but the problem is the same.
Creating Element { name: rectangle, type: rectangle }
Creating Element { name: this is a test, type: text }
Creating Element { name: button, type: group }
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Vincent Perez\Desktop\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\Vincent Perez\Desktop\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 29, in init
self.elements = [
^
File "C:\Users\Vincent Perez\Desktop\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 30, in
^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1776.0_x64__qbz5n2kfra8p0\Lib\tkinter_init_.py", line 1948, in call return self.func(*args) ^^^^^^^^^^^^^^^^ File "C:\Users\Vincent Perez\Desktop\Tkinter-Designer-master\gui\gui.py", line 72, in btn_clicked designer.design() File "C:\Users\Vincent Perez\Desktop\Tkinter-Designer-master\tkdesigner\designer.py", line 32, in design code = self.to_code() ^^^^^^^^^^^^^^ File "C:\Users\Vincent Perez\Desktop\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
- I do get the same issue, I already double checked if my frames are correct and the names of my elements but still do get the same error. I did even created a new figma file and made just a simple program that just displays a button and a text still do get the same error.
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.
had the same problem. TkDesigner isn't compatible with the newest version of pillow that runs on python 3.12. I solved this by simply getting Python 3.10 and downloading tkdesigner on it and then running the gui.py in python 3.10 (in my case in windows I simply did this in my terminal: Tkinter-Designer-master\gui> py -3.10 gui.py I work in VS Code and windows so my solution may differ over different OS.