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

I having issue of the bbox = self.node["absoluteBoundingBox"] KeyError: 'absoluteBoundingBox' during output generation #325

Open korenhskoh opened 1 year ago

korenhskoh commented 1 year ago

I wanted to generate my output with correct input setup. But it come some error as below :

Creating Element { name: button, type: widget } Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\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\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 29, in init self.elements = [ File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 30, in self.create_element(child) File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\figma\frame.py", line 55, in create_element return Button( File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\figma\custom_elements.py", line 11, in init super().init(node, frame) File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\figma\vector_elements.py", line 56, in init self.x, self.y = self.position(frame) File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\figma\vector_elements.py", line 26, in position bbox = self.node["absoluteBoundingBox"] KeyError: 'absoluteBoundingBox'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64qbz5n2kfra8p0\lib\tkinter\init.py", line 1921, in call__ return self.func(*args) File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\gui\gui.py", line 72, in btn_clicked designer.design() File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\Tkinter-Designer-master\tkdesigner\designer.py", line 32, in design code = self.to_code() File "C:\Users\Koren\OneDrive\Desktop\Documents Work and Fun\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

So im confusing this whether is any mistake causing the issue . see my figma design link https://www.figma.com/file/ZO9pQmVnWZ7IjJ6fDSTeuE/Miltenyi?node-id=0%3A1&t=kaxUz0EkWACqh5yh-1

aellas commented 12 months ago

Hey @korenhskoh I know you posted this a while ago, but if you're still having issues it looks like it's becuase you have no frame in your project, please see my answer in https://github.com/ParthJadhav/Tkinter-Designer/issues/341 which should help you 👍