### Beginner needs help: Questions arise from tutorials

Posted:

**Thu Dec 29, 2016 10:42 pm**I just started to learn NEURON + Python for my undergrad project and 2 problems occur when I try to run the codes from the tutorials.

http://neuron.yale.edu/neuron/static/do ... tick1.html

1. I often go into this libnrnoc error:

when I run in:
It also occurs in codes like and
How should I fix it?

2. In the third tutorial, the following codes rotate the cells but I don't know how it is achieved mathematically.
Any help is greatly appreciated. And happy New Year guys.

http://neuron.yale.edu/neuron/static/do ... tick1.html

1. I often go into this libnrnoc error:

**"Python quit unexpectedly while using the libnrnoc.0.dylib plug-in."**when I run

Code: Select all

`dend.connect(soma(1))`

Code: Select all

```
import sys
sys.path.append('/Applications/NEURON-7.3/nrn/lib/python')
from neuron import h, gui
soma = h.Section(name = 'soma')
dend = h.Section(name = 'dend')
dend.connect(soma(1))
```

Code: Select all

`asyn = h.AlphaSynapse(soma(0.5))`

Code: Select all

`stim = h.IClamp(dend(1))`

2. In the third tutorial, the following codes rotate the cells but I don't know how it is achieved mathematically.

Code: Select all

```
def rotateZ(self, theta):
"""Rotate the cell about the Z axis."""
for sec in self.all:
for i in range(2):
x = h.x3d(i) * sin(theta) + h.y3d(i) * cos(theta)
y = h.x3d(i) * cos(theta) + h.y3d(i) * -sin(theta)
h.pt3dchange(i, x, y, h.z3d(i), h.diam3d(i))
```