Skip to content

Error handling for insert #3792

Description

@ramcdougal

Overview of the feature

Attempting to do this should raise a meaningful error message instead of segfaulting:

>>> from neuron import n
>>> soma = n.Section("soma")
>>> n.hh.insert(soma(0.5))

segfault occurs in mac and linux. Haven't tested Windows.

The underlying issue here is that the attempt to iterate through segments with no inserted mechanisms is failing:

>>> from neuron import n
>>> soma = n.Section("soma")
>>> for mech in soma(0.5): break
... 
zsh: segmentation fault  python

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions