Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR : Frame not found (BUT FRAME IS THERE) #377

Open
Euclid737 opened this issue Dec 16, 2023 · 3 comments
Open

ERROR : Frame not found (BUT FRAME IS THERE) #377

Euclid737 opened this issue Dec 16, 2023 · 3 comments

Comments

@Euclid737
Copy link

Euclid737 commented Dec 16, 2023

I have created a Design file in Figma, following the steps of the Element Guide as described in https://github.com/ParthJadhav/Tkinter-Designer/blob/master/docs/instructions.md
The created page (File URL) is https://www.figma.com/file/dL344FdpJakjdUg4kEHz6X/iMagine?type=design&node-id=0%3A1&mode=design&t=OpdSedRuJcmGgr19-1

I give this and my Token ID in 'gui.py' AND IT STARTS TO CREATE THE ELEMENTS BUT it gives this error : Frame not found in figma file or is empty

Here is the full error:

`PS D:\Tkinter-Designer-master> & "D:/Users/Computer Hub/AppData/Local/Programs/Python/Python312/python.exe" d:/Tkinter-Designer-master/gui/gui.py
Creating Element { name: button, type: rectangle }
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\Tkinter-Designer-master\tkdesigner\designer.py", line 21, in to_code
frame = Frame(f, self.figma_file, self.output_path, self.frameCounter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 30, in init
self.create_element(child)
File "D:\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 51, in create_element
download_image(image_url, image_path)
File "D:\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 "D:\Users\Computer Hub\AppData\Local\Programs\Python\Python312\Lib\tkinter_init_.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "d:\Tkinter-Designer-master\gui\gui.py", line 72, in btn_clicked
designer.design()
File "D:\Tkinter-Designer-master\tkdesigner\designer.py", line 32, in design
code = self.to_code()
^^^^^^^^^^^^^^
File "D:\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`

Please help me.

@adityax4
Copy link
Contributor

I had the same issue, but i resolved the issue.
This error is occurring because one module in pillow package is deprecated.
So if you have the latest python 3.12.1, you'll have to install latest pillow package version and use that latest module.

@orcnet
Copy link

orcnet commented Mar 13, 2024

I am having the same issue and only downloaded yesterday 12/3/24.
I have tried to update Pillow but it has stated it is up to date.
please help.

Creating Element { name: image, type: rectangle }
Creating Element { name: button, type: ellipse }
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\tkdesigner\designer.py", line 21, in to_code
frame = Frame(f, self.figma_file, self.output_path, self.frameCounter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 29, in init
self.elements = [
^
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 30, in
self.create_element(child)
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 51, in create_element
download_image(image_url, image_path)
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\tkdesigner\utils.py", line 20, in download_image
response = requests.get(url)
^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\sessions.py", line 528, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\requests\sessions.py", line 456, in prepare_request
p.prepare(
File "C:\Python311\Lib\site-packages\requests\models.py", line 316, in prepare
self.prepare_url(url, params)
File "C:\Python311\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:\Python311\Lib\tkinter_init_.py", line 1948, in call
return self.func(*args)
^^^^^^^^^^^^^^^^
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\gui\gui.py", line 72, in btn_clicked
designer.design()
File "D:\Users\gaming\Python\source\Tkinter-Designer-master\tkdesigner\designer.py", line 32, in design
code = self.to_code()
^^^^^^^^^^^^^^
File "D:\Users\gaming\Python\source\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

@ShevamV
Copy link

ShevamV commented Apr 20, 2024

I am Having the Same Error

requests.exceptions.MissingSchema: Invalid URL 'None': No schema supplied. Perhaps you meant http://None?

During handling of the above exception, another exception occurred:
...
raise Exception("Frame not found in figma file or is empty")
Exception: Frame not found in figma file or is empty

like this, Please tell me if there's any solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants