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

libraryLink attribute in Footprint class missing #5

Closed
mvnmgrx opened this issue May 12, 2022 · 0 comments
Closed

libraryLink attribute in Footprint class missing #5

mvnmgrx opened this issue May 12, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mvnmgrx
Copy link
Owner

mvnmgrx commented May 12, 2022

This MWE does throw an attribute exception:

from kiutils.kiutils.footprint import Footprint

footprint = Footprint(version='20220512', generator='mygen')

footprint.to_file("test.kicad_mod")
Traceback (most recent call last):
  File "e:\etc\projects\py-pingen\pingen.py", line 8, in <module>
    footprint.to_file("test.kicad_mod")
  File "e:\etc\projects\py-pingen\kiutils\kiutils\footprint.py", line 854, in to_file
    outfile.write(self.to_sexpr())
  File "e:\etc\projects\py-pingen\kiutils\kiutils\footprint.py", line 876, in to_sexpr
    expression =  f'{indents}(footprint "{dequote(self.libraryLink)}"{locked}{placed}{version}{generator}'
AttributeError: 'Footprint' object has no attribute 'libraryLink'

Fix:
In footprint.py -> class Footprint() the token version is defined twice. One of them should be libraryLink, as already documented there.

@mvnmgrx mvnmgrx added the bug Something isn't working label May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant