Skip to content

Commit 772be2e

Browse files
authored
Merge pull request #7 from railnova/add_formating_UTF8
add utf8 encodage
2 parents ea1e586 + b90db1b commit 772be2e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/python_netlist/netlist.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ class Netlist:
1313
def __init__(self, path):
1414
self.path = path
1515
netlist = {}
16-
with open(path) as net:
17-
txt = net.readlines()
16+
with open(path, encoding='utf-8') as net:
17+
try:
18+
txt = net.readlines()
19+
except UnicodeDecodeError:
20+
print("\n!!! Make sure the symbol degree is not in the part description !!!\n")
21+
return
1822
i = 0
1923
while "NODE" not in txt[i]:
2024
i += 1

0 commit comments

Comments
 (0)