diff options
author | athulappadan | 2016-11-18 11:14:14 +0530 |
---|---|---|
committer | athulappadan | 2016-11-18 11:14:14 +0530 |
commit | 1e2b6eef64fc351112652ff6bab56bb523765c1c (patch) | |
tree | d7b14f67f5b8f37043913f640a364f9a8ad43ba7 /src/kicadtoNgspice | |
parent | 15964f4b1b3a08cd97b19c4250db5ce00fe2ae55 (diff) | |
download | eSim-1e2b6eef64fc351112652ff6bab56bb523765c1c.tar.gz eSim-1e2b6eef64fc351112652ff6bab56bb523765c1c.tar.bz2 eSim-1e2b6eef64fc351112652ff6bab56bb523765c1c.zip |
Bug in generating model details fixed
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r-- | src/kicadtoNgspice/Model.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py index ca6eaeff..7276d81a 100644 --- a/src/kicadtoNgspice/Model.py +++ b/src/kicadtoNgspice/Model.py @@ -24,6 +24,7 @@ class Model(QtGui.QWidget): f = open(os.path.join(projpath,project_name+"_Previous_Values.json"),'r') data = f.read() json_data = json.loads(data) + print "------------------------------", json_data["model"] except: print "Model Previous Values JSON is Empty" @@ -69,9 +70,9 @@ class Model(QtGui.QWidget): modelgrid.addWidget(self.obj_trac.model_entry_var[self.nextcount], self.nextrow, 1) try: - for key in json_data["model"]: - if json_data["model"][key]["type"] == line[2] and key == line[3]: - self.obj_trac.model_entry_var[self.nextcount].setText(str(json_data["model"][key]["values"][i].values()[0])) + for mod in json_data["model"]: + if json_data["model"][mod]["type"] == line[2] and mod == line[3]: + self.obj_trac.model_entry_var[self.nextcount].setText(str(json_data["model"][mod]["values"][i].values()[0])) i = i + 1 except: pass @@ -88,9 +89,9 @@ class Model(QtGui.QWidget): modelgrid.addWidget(self.obj_trac.model_entry_var[self.nextcount], self.nextrow, 1) try: - for key in json_data["model"]: - if json_data["model"][key]["type"] == line[2] and key == line[3]: - self.obj_trac.model_entry_var[self.nextcount].setText(str(json_data["model"][key]["values"][i].values()[0])) + for mod in json_data["model"]: + if json_data["model"][mod]["type"] == line[2] and mod == line[3]: + self.obj_trac.model_entry_var[self.nextcount].setText(str(json_data["model"][mod]["values"][i].values()[0])) i = i + 1 except: pass |