fix create_footprints_from_pcad for python3

This commit is contained in:
andreika-git 2022-08-30 16:49:08 +03:00
parent 7758790227
commit 8a4035a35a
2 changed files with 3 additions and 2 deletions

View File

@ -48,4 +48,4 @@ sed -E ":a;N;s/Comment.+\n/Comment,Designator,Footprint,LCSC Part #/g" ${src_pat
# process and copy CPL
python3.8 ./bin/jlc_kicad_tools/jlc_fix.py -o ${dst_path} ${src_path} ${name}-altium-CPL.csv ${name}-CPL.csv
# create a footprint library from PCAD ASCII file
python ./bin/create_footprints_from_pcad.py ${src_path}/${name}-pcad.PCB ibom-data
python3.8 ./bin/create_footprints_from_pcad.py ${src_path}/${name}-pcad.PCB ibom-data

View File

@ -64,7 +64,8 @@ def getNumber(v):
return val
return 0
with open(pcadFileName, 'rt') as fp:
with open(pcadFileName, 'rt', encoding='latin1') as fp:
print (pcadFileName)
for line in fp:
root = pat_root.match(line)
if root: