On and off error: Signal(<Neurons of <Ensemble "a">>.voltage[(slice(None, 5, None),)], shape=(5,))


I get an error that sometimes it appears and sometimes it doesn´t. Do you know why is this so?

import nengo

model = nengo.Network()
with model:
    stim = nengo.Node([0])
    a = nengo.Ensemble(label='a', n_neurons=50, dimensions=1)
    b=nengo.Ensemble (n_neurons=50, dimensions=2)
    nengo.Connection(stim, a)
    nengo.Connection (b,b)
Traceback (most recent call last):
  File "c:\users\f_r_e\anaconda3\lib\site-packages\nengo\builder\signal. py", line 245, in __getitem__
    return dict.__getitem__(self, key)
KeyError: Signal(<Neurons of <Ensemble "a">>.voltage[(slice(None, 5, None),)], shape=(5,))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\f_r_e\anaconda3\lib\site-packages\nengo_gui\page .py", line 503, in runner
  File "c:\users\f_r_e\anaconda3\lib\site-packages\nengo\simulator .py", line 346, in step
  File "c:\users\f_r_e\anaconda3\lib\site-packages\nengo\simulator .py", line 232, in _probe
    tmp = self.signals[self.model.sig[probe]['in']].copy()
  File "c:\users\f_r_e\anaconda3\lib\site-packages\nengo\builder\signal .py", line 249, in __getitem__
    base = dict.__getitem__(self, key.base)
KeyError: Signal(<Neurons of <Ensemble "a">>.voltage, shape=(50,))


Hi @jescab01, are you running this model in the GUI? I am also getting this error when I add a voltage graph and try running the model. So, there is currently something wrong with the voltage graph.

While we fix this problem, you can try removing any voltage graphs that you might have in the GUI (right click on the graph and click “Remove”) and rerunning the model. Other graphs seem to be working fine, it’s just the voltage graph that is an issue.

I’ll post another comment here when we’ve figured out what’s wrong with the voltage graph.


We were able to fix the voltage graph crash. The fix is now available in the developer version of Nengo GUI; you can install it with these steps, or you can avoid voltage graphs until we do another release of the GUI, which will include this fix. Thanks!