@@ -513,7 +513,7 @@ def _create3D_shapes(self, json_path: str):
513513 sim .loadSimData (json_path )
514514
515515 def loadFromIndexFile (self , json_path : str ):
516- cfg , netParams = sim .loadFromIndexFile (json_path )
516+ cfg , netParams = sim .loadModel (json_path , loadMechs = True , ignoreMechAlreadyExistsError = True )
517517 self .simConfig = cfg
518518 self .netParams = netParams
519519
@@ -539,7 +539,6 @@ def saveToIndexFile(self, srcPath, dstPath, exportNetParamsAsPython, exportSimCo
539539 exportNetParamsAsPython = exportNetParamsAsPython ,
540540 exportSimConfigAsPython = exportSimConfigAsPython )
541541
542-
543542 def importModel (self , modelParameters ):
544543 """ Imports a model stored in form of Python files.
545544
@@ -602,7 +601,7 @@ def importModel(self, modelParameters):
602601
603602 def importNeuroML (self , modelParameters ):
604603 from netpyne_ui .helpers import neuroml
605-
604+
606605
607606 try :
608607 # Get Current dir
@@ -611,9 +610,9 @@ def importNeuroML(self, modelParameters):
611610 with redirect_stdout (sys .__stdout__ ):
612611 # NetParams
613612 filename = str (modelParameters ["fileName" ])
614-
613+
615614 json_fname = neuroml .convertNeuroML2 (filename , compileMod = modelParameters ["compileMod" ])
616-
615+
617616 return self .loadModel (args = dict (
618617 compileMod = True ,
619618 modFolder = os .path .dirname (json_fname ),
@@ -632,7 +631,7 @@ def importNeuroML(self, modelParameters):
632631
633632 def importLEMS (self , modelParameters ):
634633 from netpyne_ui .helpers import neuroml
635-
634+
636635
637636 try :
638637 # Get Current dir
@@ -641,7 +640,7 @@ def importLEMS(self, modelParameters):
641640 with redirect_stdout (sys .__stdout__ ):
642641 # NetParams
643642 filename = str (modelParameters ["fileName" ])
644-
643+
645644 json_fname = neuroml .convertLEMSSimulation (filename )
646645
647646 return self .loadModel (args = dict (
0 commit comments