Import MorphML file in Python RuntimeError
Posted: Wed Feb 15, 2012 6:16 am
Hi,
I'm having a problem here importing a MorphoML file generated by NEURON itself (NEURON -- VERSION 7.3 (581:b1b7836b8bab) b1b7836b8bab) in Python. I've built nrnpython against a macports build of Python 2.7 using this recipe: http://compneuro.umb.no/LFPy/informatio ... n-mac-os-x.
The problem is that the python classes neuron.neuroml.rdxml is not found, apparently. I see these files are located in my Applications folder, but should these not be installed in /site-packages/neuron together with the neuron module? Is there simply another file that needs loading before calling Import3d.input('C030796A-P1.xml')?
Consider the following code;
The error message;
Cheers,
Espen
I'm having a problem here importing a MorphoML file generated by NEURON itself (NEURON -- VERSION 7.3 (581:b1b7836b8bab) b1b7836b8bab) in Python. I've built nrnpython against a macports build of Python 2.7 using this recipe: http://compneuro.umb.no/LFPy/informatio ... n-mac-os-x.
The problem is that the python classes neuron.neuroml.rdxml is not found, apparently. I see these files are located in my Applications folder, but should these not be installed in /site-packages/neuron together with the neuron module? Is there simply another file that needs loading before calling Import3d.input('C030796A-P1.xml')?
Consider the following code;
Code: Select all
#/usr/bin/env python
import neuron
neuron.h.load_file('stdlib.hoc')
neuron.h.load_file('import3d.hoc')
neuron.h('objref this')
Import3d = neuron.h.Import3d_MorphML()
Import3d.input('C030796A-P1.xml')
imprt = neuron.h.Import3d_GUI(Import3d, 0)
imprt.instantiate(neuron.h.this)
Code: Select all
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/Users/ehagen/Downloads/<string> in <module>()
ImportError: No module named neuroml.rdxml
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/Users/ehagen/Downloads/<string> in <module>()
NameError: name 'rdxml' is not defined
NEURON: No attribute: rdxml
near line 0
objref this
^
Import3d_MorphML[1].input("C030796A-P1.xml")
oc_restore_code tobj_count=2 should be 1
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/Users/ehagen/Downloads/<ipython-input-9-dd24556d4a2c> in <module>()
6
7 Import3d = neuron.h.Import3d_MorphML()
----> 8 Import3d.input('C030796A-P1.xml')
9 imprt = neuron.h.Import3d_GUI(Import3d, 0)
10 imprt.instantiate(neuron.h.this)
RuntimeError: hoc error
Espen