Skip to content

Commit cde4676

Browse files
committed
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into osb2-dev
2 parents 1b4cc51 + f0edbbc commit cde4676

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,16 @@ def simulateNetPyNEModelInGeppetto(self, args):
304304
return self.simulate_single_model(experiment, use_prev_inst)
305305
except Exception:
306306
experiment.state = model.ExperimentState.ERROR
307-
message = ("Unknown error during simulation of Experiment. SimulationId %i" % sim_id)
307+
message = f"Unknown error during simulation of Experiment. SimulationId {sim_id}"
308308
logging.exception(message)
309-
return utils.getJSONError(message, sys.exc_info())
309+
# return utils.getJSONError("Unknown error during simulation of Experiment", sys.exc_info(), { "sim_id": sim_id})
310+
return utils.getJSONError("Unknown error during simulation of Experiment", sys.exc_info())
310311

311312
else:
312313
return self.simulate_single_model(use_prev_inst=use_prev_inst)
313314

314315
except Exception as e :
315-
message = ("Error while simulating the NetPyNE model: %s. SimulationId %f" % (e, sim_id))
316+
message = f"Error while simulating the NetPyNE model: {e}. SimulationId {sim_id}"
316317
logging.exception(message)
317318
return utils.getJSONError(message, sys.exc_info())
318319

webapp/components/topbar/menuConfiguration.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
setTheme,
1515
} from '../../redux/actions/general';
1616
import {
17+
MODEL_STATE,
1718
TOPBAR_CONSTANTS, THEMES, TUTORIALS_LIST,
1819
} from '../../constants';
1920
import { openLaunchDialog } from '../../redux/actions/experiments';
@@ -344,7 +345,8 @@ export const getModelMenu = (props) => (
344345
? [openLaunchDialog()]
345346
// TODO: (#263) this logic causes issues by potentially simulating
346347
// old instance with modified netParams and simConfig
347-
: [props.modelState ? createAndSimulateNetwork : simulateNetwork],
348+
// : [props.modelState ? createAndSimulateNetwork : simulateNetwork],
349+
: [props.modelState === MODEL_STATE.NOT_INSTANTIATED ? createAndSimulateNetwork : simulateNetwork()],
348350
},
349351
},
350352
{

0 commit comments

Comments
 (0)