FreeCAD error when loading PCB using StepUp - Python

hey there,

i’m trying to export a 3D model of the PCB with models, and all layers
i saw that it can be done by using SetpUp on free cad
The SetpUp is installed and when i load the PCB file i get an error

i’m using a Windows, Kicad 6.0.2

09:05:08 Running the Python command ‘ksuToolsOpenBoard’ failed:
Traceback (most recent call last):

  • File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUpCMD.py”, line 947, in Activated*
  • kicadStepUptools.onLoadBoard()*
  • File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\kicadStepUptools.py”, line 6602, in onLoadBoard*
  • mypcb = KicadPCB.load(name) #test parser*
  • File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\fcad_parser\kicad_pcb.py”, line 99, in load*
  • return KicadPCB(parseSexp(f.read().decode(“UTF-8”), quote_no_parse)) # maui*
  • File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod\fcad_parser\sexp_parser\sexp_parser.py”, line 798, in parseSexp*
  • assert stack, “Trouble with nesting of brackets”*

Trouble with nesting of brackets

can you help to identify the issue?

thank you

Firstly 6.0.2 is several bug fix releases obsolete, please update 6.0.9 and try again

After updating Kicad and FreeCad the the latest version,
there is errors when tring to load the board

Running the Python command ‘ksuToolsOpenBoard’ failed:
Traceback (most recent call last):
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUpCMD.py”, line 947, in Activated
kicadStepUptools.onLoadBoard()
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUptools.py”, line 6602, in onLoadBoard
mypcb = KicadPCB.load(name) #test parser
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\fcad_parser\kicad_pcb.py”, line 99, in load
return KicadPCB(parseSexp(f.read().decode(“UTF-8”), quote_no_parse)) # maui
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\fcad_parser\sexp_parser\sexp_parser.py”, line 798, in parseSexp
assert stack, “Trouble with nesting of brackets”

Trouble with nesting of brackets

1 Like

would you mind to share the file (even in PM if needed)?
Did your file loaded fine before the StepUp update?

Thanks for doing the upgrade. @maui is the developer of the KiCad to FreCAD interface, so he can look into this if you share your design with him

The PCB File works well on the KiCad layout, i never tried to open the file on FreeCad
I do this only for having all layers on a STEP File for mechanical development (there are Pads that are use for soldering wires, we need to see if there is no collusion with mechanical parts)

I can’t upload a file to here (New User) can you PM me so i could send you the file?

thank you

Hi @Gal_BTM

This in the FAQ explains New User restrictions and promotion requirements.

I have promoted you one level, so you can post now

thank you for the promotion

please see attached file
LED_RING.kicad_pcb (93.6 KB)

thank you for your help

@Gal_BTM
which is your StepUp release version?
Is there some UTF characters on your file path?
I have no issue on “kicad StepUp version 10.7.6”
and FreeCAD version

OS: Windows 10 Version 1909
Word size of FreeCAD: 64-bit
Version: 0.21.31035 (Git)
Build type: Release
Branch: master
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3

the board looks nice :slight_smile:
I have installed the SetpUp this week so it must be the latest
python: 3.10.8

Doese the FreeCad version is old? i see you have 0.21 , i have 0.19 ?

Screenshot 2022-11-21 114425

update:

  • removed FreeCad and install the latest version on the website- 0.20.1
  • file path is c:\

still having errors

I still don’t have issue with FC 0.19.4
Could you please post all the log file in the FC report panel?
(it is selectable text … just copy and paste here or attach a txt file)

kSU WB v10.16.5 is the latest

the log file from the report panel:

12:57:21 PoM not present
12:57:21 using ‘Part’ container and ‘Links’
12:57:21 FC Version 020-1
12:57:21 kicad StepUp version 10.7.6
12:57:21 tolerance on vertex applied
12:57:21 applying Materials to Shapes
12:57:21 your home path is C:\Users\gal.magen
12:57:21 export to STEP False
12:57:21 Tabified done !
12:57:21 done!
12:57:24 opening C:/Users/gal.magen/Downloads/LED_RING.kicad_pcb
12:57:24 my file path C:\Users\gal.magen\Downloads
12:57:24 opening Transaction ‘opening_kicad’
12:57:24 Running the Python command ‘ksuToolsOpenBoard’ failed:
Traceback (most recent call last):
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUpCMD.py”, line 947, in Activated
kicadStepUptools.onLoadBoard()
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\kicadStepUptools.py”, line 6602, in onLoadBoard
mypcb = KicadPCB.load(name) #test parser
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\fcad_parser\kicad_pcb.py”, line 99, in load
return KicadPCB(parseSexp(f.read().decode(“UTF-8”), quote_no_parse)) # maui
File “C:\Users\gal.magen\AppData\Roaming\FreeCAD\Mod\kicadStepUpMod.\fcad_parser\sexp_parser\sexp_parser.py”, line 798, in parseSexp
assert stack, “Trouble with nesting of brackets”

Trouble with nesting of brackets

Trouble with nesting of brackets

humm…
which is your KICAD6_3DMODEL_DIR value in your Kicad preferences and in your FreeCAD preferences?

Could the “.” in the username be the problem?

not sure, but I have tried with a similar path without issue
C:/Users/maui/Downloads/folder.test
a similar error message here, but with a intermediate k 5.99 version:

how can i see my path on the program?

in Freecad go to StepUp WB, then go to FC Menu Edit->Preferences and on the left click on SteUp icon and see for the 3D paths

In Kicad pcb:
The PreferencesConfigure Paths…​ menu

configure_path_dlg