andrewshilliday / garage-door-controller

Software to monitor and control garage doors via a raspberry pi
MIT License
327 stars 132 forks source link

Web server won't start following apt upgrade #136

Open DervMan opened 8 months ago

DervMan commented 8 months ago

I've been using this brilliant solution for quite a few years. It's running on a PI and I've never had an issue before. However! I recently apt upgraded the Raspbian OS and now controller.py won't start up. Here's some additional info

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster

Here's the error when loading via the cli

root@pi:/home/pi/garage-door-controller# python 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)
--- <exception caught here> ---
  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

I've pulled a clean version using the install guide and currently have the default config file having also tried the previous (working) config.

Any suggestions/thoughts as to what's failing?

Thanks

Gilles94500 commented 8 months ago

It may be related to Python3/twisted instead of Python2. The script is developed with Python2 and I remember having had some issues with that a couple of years ago.

From: DervMan @.> Sent: lundi 16 octobre 2023 16:48 To: andrewshilliday/garage-door-controller @.> Cc: Subscribed @.***> Subject: [andrewshilliday/garage-door-controller] Web server won't start following apt upgrade (Issue #136)

I've been using this brilliant solution for quite a few years. It's running on a PI and I've never had an issue before. However! I recently apt upgraded the Raspbian OS and now controller.py won't start up. Here's some additional info

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster

Here's the error when loading via the cli

@.:/home/pi/garage-door-controller# python 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

I've pulled a clean version using the install guide and currently have the default config file having also tried the previous (working) config.

Any suggestions/thoughts as to what's failing?

Thanks

— Reply to this email directly, view it on GitHub https://github.com/andrewshilliday/garage-door-controller/issues/136 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEA4RAJ7F6B2EF6QPOWQUILX7VCKJAVCNFSM6AAAAAA6CKMF4CVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2DKMZZG42DOMI . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AEA4RALIEXUB3K34733NIGLX7VCKJA5CNFSM6AAAAAA6CKMF4CWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHH5DI34.gif Message ID: @. @.> >

-- Cet e-mail a été vérifié par le logiciel antivirus d'Avast. www.avast.com

DervMan commented 8 months ago

I've reinstalled raspbian on the PI and that comes with Python3. Looking at the forum that won't work with this code. It's a real shame as this software is brilliant. I'm not going to spend anymore time on this and instead look for an altertive tool.