I've built a Raspbian Buster on Raspberry Pi Zero W Rev 1.1 and I'm using Python 2.7.16.
When I run the script manually with the door sensor in different states, open or closed, this is correctly reported on the web page. However, if I try to change the state with the script running the change isn't reported.
pi@WestonsSecurity1:~/garage-door-controller $ python2 controller.py
Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1267, in run
self.mainLoop()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1276, in mainLoop
self.runUntilCurrent()
File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 902, in runUntilCurrent
call.func(*call.args, call.kw)
File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 239, in call
d = defer.maybeDeferred(self.f, *self.a, *self.kw)
--- ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 151, in maybeDeferred
result = f(args, kw)
File "controller.py", line 152, in status_check
self.send_msg(door, title, message)
File "controller.py", line 166, in send_msg
for alert in self.alert_type:
exceptions.TypeError: 'NoneType' object is not iterable
Hi,
I've built a Raspbian Buster on Raspberry Pi Zero W Rev 1.1 and I'm using Python 2.7.16.
When I run the script manually with the door sensor in different states, open or closed, this is correctly reported on the web page. However, if I try to change the state with the script running the change isn't reported.
pi@WestonsSecurity1:~/garage-door-controller $ python2 controller.py Unhandled error in Deferred:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1267, in run self.mainLoop() File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 1276, in mainLoop self.runUntilCurrent() File "/usr/lib/python2.7/dist-packages/twisted/internet/base.py", line 902, in runUntilCurrent call.func(*call.args, call.kw) File "/usr/lib/python2.7/dist-packages/twisted/internet/task.py", line 239, in call d = defer.maybeDeferred(self.f, *self.a, *self.kw) --- ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 151, in maybeDeferred
result = f( args, kw)
File "controller.py", line 152, in status_check
self.send_msg(door, title, message)
File "controller.py", line 166, in send_msg
for alert in self.alert_type:
exceptions.TypeError: 'NoneType' object is not iterable
Any help would be greatly appreciated.
Regards, Paul.