topikachu / python-ev3

a project to run lego ev3 in python
Apache License 2.0
189 stars 73 forks source link

motor is not working #72

Open golangpython opened 8 years ago

golangpython commented 8 years ago

d= MediumMotor() Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-armv5tejl/egg/ev3/lego.py", line 217, in init File "build/bdist.linux-armv5tejl/egg/ev3/ev3dev.py", line 330, in init TypeError: 'NoneType' object has no attribute 'getitem'

why ?

liam-b commented 8 years ago

Are you sure you've imported lang-python correctly? Also this should work:

import ev3dev.ev3 as ev3
myMotor = ev3.LargeMotor(port)
# do things with myMotor