Description of problem
Hi everyone. I tried to use Morphology.from_file
to load a neuron morphology file from NeuroMorpho.Org, and call plot_morphology
to draw it. However, except for the neuron named H16-06-013-05-06-02_576010060_m_DendriteAxon.CNG.swc, when plotted other neurons such as 485184849_reconstruction.CNG.swc, a value error raised just like below.
Minimal code to reproduce problem
from brian2 import *
from brian2tools import*
from mayavi import*
morpho = Morphology.from_file('neuromorpho//allen cell types bascket//CNG version//485184849_reconstruction.CNG.swc')
figure()
plot_morphology(morpho, plot_3d=True, show_diameter=True)
show()
What you have aready tried
I checked the format of these 2 files but found no difference. The line reported the error in Morphology
was also checked but it seemed to be normal as well. It was not the problem with file path either.
Expected output (if relevant)
Actual output (if relevant)
Full traceback of error (if relevant)
File "D:\python\envs\test\lib\site-packages\brian2\spatialneuron\morphology.py", line 1082, in _replace_three_point_soma
raise ValueError(f"Cannot replace '3-point-soma' by a single "
ValueError: Unknown format code 'd' for object of type 'float'