neuron_reduce icon indicating copy to clipboard operation
neuron_reduce copied to clipboard

'nrn.Segment' object has no attribute 'hname'

Open sunzhenyang2018 opened this issue 5 years ago • 5 comments

As mentioned in title, I encountered this error while running subtree_reductor

reduce_issue1

sunzhenyang2018 avatar Aug 04 '20 17:08 sunzhenyang2018

Strange, parent() should return a section and not a segment - neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/topology/secref.html#SectionRef.parent what version of NEURON do you use?

orena1 avatar Aug 05 '20 04:08 orena1

Neuron 7.7.2 I noticed from the link you provided that the syntax is SecRef.parent, without the parenthesis. Might this be an issue?

sunzhenyang2018 avatar Aug 05 '20 05:08 sunzhenyang2018

You are correct, this is probably because your axon is a parent of the soma. Strange, either I expected this use-case but not tested it, or that something in NEURON changed. Anyway, if you can send me a self-contained version of your model I can fix it.

Thanks

orena1 avatar Aug 05 '20 06:08 orena1

Sure. The hoc file I have is really long, because the majority of it is topol(). I can also send you a swc file of the morphology if you want. init_template.zip

sunzhenyang2018 avatar Aug 05 '20 14:08 sunzhenyang2018

Thanks @sunzhenyang2018 but I also need the modfiles

orena1 avatar Aug 16 '20 07:08 orena1