KiBom generator


don’t know if this thread is in the right place here.

I al using for my Bom’s the KiBom plug in.
But in my latest project when i try to generate the bom i get following error code:

Run command:
python “E:/Program Files/KiCad/bom gen/KiBoM-master/” “E:/Users/Peter/Documents/schemas/KiCad PCB/Tester_Kaboem_Main/Tester_Kaboem_Main.xml” “E:/Users/Peter/Documents/schemas/KiCad PCB/Tester_Kaboem_Main/Tester_Kaboem_Main”

Command error. Return code 1

Error messages:
Traceback (most recent call last):
File “E:/Program Files/KiCad/bom gen/KiBoM-master/”, line 124, in
groups = net.groupComponents(components)
File “E:/Program Files/KiCad/bom gen/KiBoM-master/bomlib/”, line 425, in groupComponents
g.updateFields(self.prefs.useAlt, self.prefs.altWrap)
File “E:/Program Files/KiCad/bom gen/KiBoM-master/bomlib/”, line 457, in updateFields
self.updateField(f, c.getField(f))
File “E:/Program Files/KiCad/bom gen/KiBoM-master/bomlib/”, line 446, in updateField
fld = fieldData))
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xb5’ in position 7: ordinal not in range(128)

Does someone know what to do or what it means?
Thanks In advance


Without knowing anything about KiBom I can say this is the nightmare of every python programmer - a unicode issue. Somewhere in the program python expects ascii-only string and gets a string which has a character which doesn’t belong to 7-bit ascii. It’s a programmer’s mistake and a bug in the KiBom program. Maybe you could avoid it by changing all names etc. in your data (and pathnames etc.) to have only ascii characters. Which means no German, Chinese, Turkish, Finnish etc.


Or KiBom expects to be run with python 3.x

It fails when it tries to print an error message regarding a field conflict:

(Assuming you run the version currently in the master branch. Otherwise you need to look what is at line 446 in your own version)

The char it complains about is “µ”.

Hm it seems not even python3 supports printing unicode by default on all systems. In this case the kicad internal console might be to blame. See:

Tested in fedora 26: both pyhton 2.7 and python 3.6 print unicode to the bash with default settings so i guess it is either an operating system problem or a kicad output console problem.


found the problem, Apparently i used the µ for capacitors, so instead of 1µF i put in 1uF and problem is fixed.

Thanks @eelik and @Rene_Poschl for putting me in the right direction.

Can be closed!


I would post an issue @ KiBOM GH repo to help in fixing this :smiley:


The unicode issues have kept popping up, if you have found another point of failure please raise an issue on my GitHub repo and I’ll endeavour to fix it ASAP :slight_smile:


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.