Tkinter-Designer icon indicating copy to clipboard operation
Tkinter-Designer copied to clipboard

Report bug: Frame not found in figma file or is empty.

Open Sxri opened this issue 1 year ago • 5 comments

  • 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 self.create_element(child) File "C:\Users\lurk\Tkinter-Designer\tkdesigner\figma\frame.py", line 78, in create_element download_image(image_url, image_path) File "C:\Users\lurk\Tkinter-Designer\tkdesigner\utils.py", line 20, in download_image response = requests.get(url) ^^^^^^^^^^^^^^^^^ File "C:\Users\lurk\venv\Lib\site-packages\requests\api.py", line 76, in get return request('get', url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lurk\venv\Lib\site-packages\requests\api.py", line 61, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\liamb\venv\Lib\site-packages\requests\sessions.py", line 528, in request prep = self.prepare_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lurk\venv\Lib\site-packages\requests\sessions.py", line 456, in prepare_request p.prepare( File "C:\Users\lurk\venv\Lib\site-packages\requests\models.py", line 316, in prepare self.prepare_url(url, params) File "C:\Users\lurk\venv\Lib\site-packages\requests\models.py", line 390, in prepare_url raise MissingSchema(error) requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?

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

Sxri avatar Jul 06 '23 17:07 Sxri

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: image

aellas avatar Jul 09 '23 10:07 aellas

is there a solution to this? I have followed the rules. but the problem is the same.

lutfipati96 avatar Oct 01 '23 06:10 lutfipati96

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 self.create_element(child) File "C:\Users\Vincent Perez\Desktop\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 51, in create_element download_image(image_url, image_path) File "C:\Users\Vincent Perez\Desktop\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:\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.

vincentperezzz avatar Oct 25 '23 19:10 vincentperezzz

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.

barandenizdogan avatar Nov 07 '23 19:11 barandenizdogan

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.

plant2002 avatar Nov 22 '23 09:11 plant2002