~martijnbraam/turbocase#1: 
Index out of bounds when reading in PCB file

Hello,

I am trying out turbocase but seem to have hit a bug where the PCB file doesn't load in properly?  This is on Windows 10 and KiCad 8.0.1.  There is an outline on User.6 and I've added Heights to the footprints.

"File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Drogge\AppData\Local\Programs\Python\Python312\Scripts\turbocase.exe\__main__.py", line 7, in <module>
  File "C:\Users\Drogge\AppData\Local\Programs\Python\Python312\Lib\site-packages\turbocase\__main__.py", line 16, in main
    case = load_pcb(args.pcb, args.layer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Drogge\AppData\Local\Programs\Python\Python312\Lib\site-packages\turbocase\kicad.py", line 260, in load_pcb
    c.bounds = shape_bounds(shapes)
               ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Drogge\AppData\Local\Programs\Python\Python312\Lib\site-packages\turbocase\kicad.py", line 97, in shape_bounds
    min_x = coords[0][0]
            ~~~~~~^^^
IndexError: list index out of range"

Thanks, Daniel Rogge

Status
REPORTED
Submitter
Daniel Rogge
Assigned to
No-one
Submitted
26 days ago
Updated
26 days ago
Labels
No labels applied.

~martijnbraam 26 days ago

Looks like it's an issue with parsing a connector footprint. Currently it grabs the graphics on the F.Fab layer to do that and the footprint you added the height to might not have anything on that layer.

Can you copy and paste that footprint into the issue here for reference? The footprint parser can probably be improved.

Register here or Log in to comment, or comment via email.