Nice tutorials, one minor question
Posted: Tue Aug 16, 2016 12:53 pm
I enjoyed going through the very clear and through neuron+python tutorials. I think there is one line that needs to be updated, or (more likely) it was some sort of user error on my part, being new to python. It is the ball-and-stick network tutorial at: http://neuron.yale.edu/neuron/static/do ... tick3.html
Everything was going well until I got to this line:
I omitted the name argument, and now it works fine:
I was able to complete the rest of the tutorials just fine, too. So what is/was the purpose of that 'name' argument? I am just (finally) learning Python and various searches in the Python section of the forum returned nothing for this, so I want to make sure I'm not missing anything important here. Thanks!
Everything was going well until I got to this line:
Where I got this error:syn_ = h.ExpSyn(cells[0].dend(0.5), name='syn_')
Code: Select all
>>> stim = h.NetStim() # Make a new stimulator
>>> syn_ = h.ExpSyn(cells[0].dend(0.5), name='syn_')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: invalid keyword argument
Code: Select all
>>> syn_ = h.ExpSyn(cells[0].dend(0.5))
>>> syn_
ExpSyn[0]
>>> dir(syn_)
['Section', '__call__', '__class__', '__delattr__', '__delitem__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__nonzero__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', 'allsec', 'baseattr', 'cas', 'e', 'g', 'get_loc', 'has_loc', 'hname', 'hocobjptr', 'i', 'loc', 'next', 'ref', 'same', 'setpointer', 'tau']
>>>