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

Skip unable to open V8 *.kicad_pcb files #7

Open
go2dev opened this issue Jul 17, 2024 · 1 comment
Open

Skip unable to open V8 *.kicad_pcb files #7

go2dev opened this issue Jul 17, 2024 · 1 comment

Comments

@go2dev
Copy link

go2dev commented Jul 17, 2024

Skip fails to open PCB files if they were saved from Kicad V8. The parser returns the same error when using skip as a library in another script or interactively in a REPL session. Kicad V7 PCBs open correctly. Schematics also open correctly from both V7 and V8 files.

Example error:

pcb8 = skip.PCB("C:\Dev\myProject\Control Board\LEDTest_controlboard_8.kicad_pcb")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-packages\skip\pcbnew\pcb\pcb.py", line 53, in __init__
    super().__init__(filepath)
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-packages\skip\sexp\sourcefile.py", line 89, in __init__
    self.read(filepath)
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-packages\skip\sexp\sourcefile.py", line 197, in read
    entities = list(map(lambda baseobj: wrapClass(baseobj), v))
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-packages\skip\sexp\sourcefile.py", line 197, in <lambda>
    entities = list(map(lambda baseobj: wrapClass(baseobj), v))
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-packages\skip\pcbnew\footprint.py", line 72, in __init__
    footprint_text.append(FootprintText(fptxt))
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-packages\skip\pcbnew\footprint.py", line 59, in __init__
    super().__init__(pv)
  File "C:\Users\thisUser\AppData\Local\Programs\Python\Python310\lib\site-pack
ages\skip\sexp\parser.py", line 618, in __init__
    for i in pv._base_coords:
AttributeError: 'Symbol' object has no attribute '_base_coords'

Tested on:

  • Intel i7 5930K // Windows 10 x64 22H2 // Python 3.10.6 // kicad-skip 0.2.5
  • M1 Macbook Pro // MacOS Sonoma 14.5 // Python 3.10.13 // kicad-skip 0.2.5

Test files:
LED_BOARD_REFv8.zip created in KicadV8 - fails to open

I'm not sure what _base_coords is so creating them in place or wrapping this bit in a try-catch doesn't seem sensible.

Anything that can be done the file PCB files to make them readable? (rather than changing the skip code).

@usman510
Copy link

usman510 commented Aug 9, 2024

I also receive the same error now when using KiCAD 8 and skip

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

2 participants