nengo / nengo-loihi

Run Nengo models on Intel's Loihi chip
https://www.nengo.ai/nengo-loihi/
Other
35 stars 12 forks source link

faster-comm branch: `NoneType` object has no attribute 'send' #257

Closed xchoo closed 4 years ago

xchoo commented 4 years ago

When you try to run a network that doesn't use snips using the faster-comms branch, it throws this error:

INFO:DRV:  Executor: 1000 timesteps........Done 1.56s
INFO:HST:  chip=0 cpu=0 halted, status=0x0
Traceback (most recent call last):
  File "ens_ens.py", line 36, in <module>
    sim.run(1.0)
  File "/home/pawel/src/nengo-loihi/nengo_loihi/simulator.py", line 367, in run
    self.run_steps(steps)
  File "/home/pawel/src/nengo-loihi/nengo_loihi/simulator.py", line 549, in run_steps
    self._run_steps(steps)
  File "/home/pawel/src/nengo-loihi/nengo_loihi/hardware/interface.py", line 179, in run_steps
    self.host_socket.send(struct.pack("i", steps))
AttributeError: 'NoneType' object has no attribute 'send'

It looks like it's trying to send information over the socket, but the socket is not created because no snips (host snips) are created... probably because of this line, which should either be indented one over, or have a conditional like: if self.host_socket is not None and self.host_socket_connected:?

drasmuss commented 4 years ago

Since this is part of a WIP branch, we'll make sure that this is fixed as part of the process when that branch is merged into master.