Hi,
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/KiBOM_CLI.py” “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/KiBOM_CLI.py”, line 124, in
groups = net.groupComponents(components)
File “E:/Program Files/KiCad/bom gen/KiBoM-master/bomlib/netlist_reader.py”, line 425, in groupComponents
g.updateFields(self.prefs.useAlt, self.prefs.altWrap)
File “E:/Program Files/KiCad/bom gen/KiBoM-master/bomlib/component.py”, line 457, in updateFields
self.updateField(f, c.getField(f))
File “E:/Program Files/KiCad/bom gen/KiBoM-master/bomlib/component.py”, 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
Peter
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.
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.
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