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

AttributeError: 'NoneType' object has no attribute 'FootprintLoad' #7

Open
cibomahto opened this issue Dec 16, 2024 · 1 comment
Open

Comments

@cibomahto
Copy link
Member

Attempting to run an example with KiCad 8 gives the following error:

C:\Users\matt\repos\circuitpainter\examples>python hello_painter.py
Traceback (most recent call last):
File "C:\Users\matt\repos\circuitpainter\examples\hello_painter.py", line 11, in
painter.footprint(0,0,"Resistor_SMD","R_0805_2012Metric",nets=['gnd',f'led_{angle}'])
File "C:\Users\matt\repos\circuitpainter\src\circuitpainter\circuitpainter.py", line 487, in footprint
footprint = pcbnew.FootprintLoad(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\KiCad\8.0\bin\Lib\site-packages\pcbnew.py", line 19081, in FootprintLoad
return plug.FootprintLoad(libname,name,preserveUUID)
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'FootprintLoad'

@cibomahto
Copy link
Member Author

This is caused by an incorrect path to the KiCad library on Windows. In _guess_footprint_library_path(), it is hardcoded to use the KiCad 7 library.

Changing it to 8 causes this to work, but is not a robust solution.

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

1 participant