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

Plugin fails Kicad 5.1.7 #142

Open
sslupsky opened this issue Oct 6, 2020 · 1 comment
Open

Plugin fails Kicad 5.1.7 #142

sslupsky opened this issue Oct 6, 2020 · 1 comment

Comments

@sslupsky
Copy link

sslupsky commented Oct 6, 2020

I upgraded my KiCAD to version 5.1.7 today and I noticed that KiBOM_CLI crashes:

Run command:
python “/Users/stevenslupsky/kicad/KiBoM/KiBOM_CLI.py” “-dbom” “/Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/Kicad/PB_16/Receiver_Out/Receiver_Out.xml” “/Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/Kicad/PB_16/Receiver_Out/Receiver_Out.xls”

Command error. Return code 1
Info messages:
 KiBOM version 1.8.0
 Output directory: ‘/Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/Kicad/PB_16/Receiver_Out/bom’
 Input: /Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/Kicad/PB_16/Receiver_Out/Receiver_Out.xml
 Configuration file: /Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/Kicad/PB_16/Receiver_Out/bom.ini
 PCB variant: [u’default’]

Error messages:
Traceback (most recent call last):
  File “/Users/stevenslupsky/kicad/KiBoM/KiBOM_CLI.py”, line 28, in <module>
    main()
  File “/Users/stevenslupsky/kicad/KiBoM/kibom/__main__.py”, line 194, in main
    result = writeVariant(input_file, output_dir, output_file, variant, pref)
  File “/Users/stevenslupsky/kicad/KiBoM/kibom/__main__.py”, line 55, in writeVariant
    groups = net.groupComponents(components)
  File “/Users/stevenslupsky/kicad/KiBoM/kibom/netlist_reader.py”, line 357, in groupComponents
    g.updateFields(self.prefs.useAlt)
  File “/Users/stevenslupsky/kicad/KiBoM/kibom/component.py”, line 614, in updateFields
    self.fields[ColumnList.COL_DESCRIPTION] = self.components[0].getDescription()
  File “/Users/stevenslupsky/kicad/KiBoM/kibom/component.py”, line 199, in getDescription
    raise AttributeError(‘Could not get description for part {}{}.’.format(self.getPrefix()),
IndexError: tuple index out of range

I tried it for csv, html or xls output and observed the same result.

I am not sure if the upgrade did this or something else is broken.

@set-soft
Copy link
Contributor

set-soft commented Oct 9, 2020

First about the cryptic message, line 199(+200) should be:

                raise AttributeError('Could not get description for part {}{}.'.format(self.getPrefix(), self.getSuffix()))

Current code in the repo is wrong. The code has an extra ) after self.getPrefix()

Now about the problem:

  • Fixing the above line you'll get more information about the problem (refence of the problematic part)
  • I don't see changes in the generated XML for the trivial tests
  • Can you post the /Users/stevenslupsky/Library/Mobile Documents/com~apple~CloudDocs/Kicad/PB_16/Receiver_Out/Receiver_Out.xml file?

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