SchrodingersGat / KiBoM

Configurable BoM generation tool for KiCad EDA (http://kicad.org/)
MIT License
352 stars 95 forks source link

Strings wrapped in b'' in .csv output #45

Closed martinjaeger closed 4 years ago

martinjaeger commented 5 years ago

Just updated to the most recent version. Unfortunately, it creates a .csv output as follows with the strings wrapped in b'...':

Component,Description,Part,References,Value,Footprint,Quantity Per PCB,Datasheet,Manufacturer,PartNumber,Remarks,Alternative,Config,DNP,Supplier
1,b'Unpolarized capacitor',b'C',b'C9 C10 C16 C19 C24 C25 C26 C30 C31 C32 C34 C39 C42',b'100n',b'C_0603_1608',b'13',b'',b'Yageo',b'CC0603KRX7R9BB104',b'',b'',b'',b'',b''

Using Python 3.7.0 on Linux.

martinjaeger commented 5 years ago

Seems to be an issue only with Python 3. Using Python 2 it worked.

trentks commented 5 years ago

Also the same error, also on Linux, and I can also confirm that running it with python2 instead of python3 produces the expected result.

trentks commented 4 years ago

@SchrodingersGat

Probably a good idea to implement something like #29, I don't think there's any harm in explicitly calling python2. The script doesn't behave well with python3 and that's the default alias of python in most environments.

At the very least perhaps the README.md should stress the need for python2, and perhaps example/html_ex.png could reflect this.

martinjaeger commented 4 years ago

Well, as Python 2 reaches its end of life this year and will not be maintained anymore from 2020 on, I think it would be a good idea to support Python 3 instead.

trentks commented 4 years ago

Fair point @martinjaeger, I do recall having briefly tried to find the cause / debug this some months ago--but I never did get to the bottom of it. I might have another crack at it. This issue is somewhat annoying.

SchrodingersGat commented 4 years ago

Good points all around. Do either of you have time to look into this? Unfortunately I can't dedicate any time to this right now. I'd be happy to look at a PR :)

SchrodingersGat commented 4 years ago

Fixed in https://github.com/SchrodingersGat/KiBoM/pull/59