I am new to python and hit the wall. I followed a few tutorials, but can not get past the error:
Traceback (most recent call last): File "C:\Users\Dom\Desktop\test\test.py", line 7, in <module> p = Pump.getPumps() TypeError: getPumps() missing 1 required positional argument: 'self'
I studied a few tutorials, but it seems that something is not like my code. The only thing I can think of is that python 3.3 requires a different syntax.
main scipt:
# test script from lib.pump import Pump print ("THIS IS A TEST OF PYTHON")
Pump class:
import pymysql class Pump: def __init__(self): print ("init")
If I understand correctly, that "I" is automatically passed to the constructor and methods. What am I doing wrong here?
I am using Windows 8 with python 3.3.2
DominicM Jul 08 '13 at 19:21 2013-07-08 19:21
source share