From 381b96af815f619719d490824c23077fb893eff8 Mon Sep 17 00:00:00 2001 From: Eyantra698Sumanto Date: Fri, 26 Aug 2022 18:13:04 +0530 Subject: Fixed path_name undefined and out of bound index errors --- src/kicadtoNgspice/Convert.py | 2 +- src/kicadtoNgspice/DeviceModel.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/kicadtoNgspice/Convert.py b/src/kicadtoNgspice/Convert.py index 9aec6cce..7d68e44e 100755 --- a/src/kicadtoNgspice/Convert.py +++ b/src/kicadtoNgspice/Convert.py @@ -554,7 +554,7 @@ class Convert: print(tempStr) includeLine.append( ".lib \"" + tempStr[0] + "\" " + tempStr[1]) - deviceLine[index] = '' + deviceLine[index] = '*scmode' # words.append(completeLibPath) # deviceLine[index] = words diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index b120f2e7..c1eb5f90 100755 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -159,11 +159,13 @@ sky130_fd_pr/models/sky130.lib.spice") self.entry_var[self.count].setText("") self.entry_var[self.count].setMaximumWidth(150) self.entry_var[self.count].setObjectName("%d" % beg) + path_name = '' for child in self.root: if child.tag == "scmode1": if child[1].text: self.entry_var[self.count] \ .setText(child[1].text) + path_name = child[0].text else: self.entry_var[self.count].setText("") @@ -223,6 +225,7 @@ sky130_fd_pr/models/sky130.lib.spice") sky130box.setTitle( "Add parameters for " + words[0] + " : " + words[-1]) + path_name = '' # Adding to get sky130 dimension self.parameterLabel[self.count] = QtWidgets.QLabel( @@ -251,7 +254,7 @@ sky130_fd_pr/models/sky130.lib.spice") if child[0].text: self.entry_var[self.count] \ .setText(child[0].text) - path_name = "" + path_name = child[0].text else: self.entry_var[self.count].setText("") path_name = "" -- cgit