Open arnoldmitrica opened 4 years ago
Yes, the 0-argument syntax is specific to Python 3.
In Python 2 and code that must be cross-version compatible, just stick to passing in the class object and instance explicitly.
And by the way, Python 2 has reached End Of Life. Try to change to Python 3
First, thank you for your tutorial from yt. Really nice done.
After I load the script using python lock.py it says:
Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(*self.args, **self.__kwargs) File "lock.py", line 195, in listen_rfid rfid_presented += keys[ event.code ] IndexError: string index out of range
Exception TypeError: TypeError('super() takes at least 1 argument (0 given)',) in <bound method InputDevice.del of InputDevice('/dev/input/event0')> ignored
-------------------------------------For line 801 in threading.py----------------------------------
def __bootstrap_inner(self):
---------------------------------------For line 754 in threading.py ------------------------------
def run(self):