error after updating

General Discussion

error after updating

Postby billfor » Mon Feb 18, 2019 3:49 pm

Hi, I pulled updates after two years , and got the following error. Was wondering if anyone else got it and what could be done. The web app starts but the panel never says ready.

2019-02-18 18:20:53,855 ERROR: Error [in /opt/alarmdecoder-webapp/ad2web/app.py:175]
Traceback (most recent call last):
File "/opt/alarmdecoder-webapp/ad2web/app.py", line 168, in init_app
app.decoder.init()
File "/opt/alarmdecoder-webapp/ad2web/decoder.py", line 240, in init
self._notifier_system = NotificationSystem()
File "/opt/alarmdecoder-webapp/ad2web/notifications/types.py", line 90, in __init__
self._init_notifiers()
File "/opt/alarmdecoder-webapp/ad2web/notifications/types.py", line 216, in _init_notifiers
self._notifiers[n.id] = TYPE_MAP[n.type](n)
File "/opt/alarmdecoder-webapp/ad2web/notifications/types.py", line 930, in __init__
self.auth_username = self.auth_username.replace('\n', '')
AttributeError: 'NoneType' object has no attribute 'replace'
billfor
newt
newt
 
Posts: 14
Joined: Wed Mar 01, 2017 4:32 pm

Re: error after updating

Postby billfor » Mon Feb 18, 2019 3:59 pm

Just to reply to my own post, I commented out those lines that use the replace function, and the app seems to work without any issue so far. But I'm not sure I should do that.
billfor
newt
newt
 
Posts: 14
Joined: Wed Mar 01, 2017 4:32 pm

Re: error after updating

Postby mathewss » Mon Feb 18, 2019 4:21 pm

What branch were you on and how old is your base image? If its the older Raspbian 8 then it probably wont update correctly depending on exactly what version it was. Get a backup of your settings and report back on your Pi image version. If it is old I suggest upgrade to the latest or wait a few days and I will be updating the base image with all the changes I did this weekend on the 'dev' branch.

Best
Sean M
mathewss
Moderator
Moderator
 
Posts: 34
Joined: Fri Dec 06, 2013 11:14 am

Re: error after updating

Postby billfor » Mon Feb 18, 2019 4:49 pm

Yeah it was pretty damn old :-)

root@alarmpi:/opt/alarmdecoder-webapp/.git# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie


I originally installed it a couple of years back. This is not a prebuild image. I installed it manually. I never switched branches so I think I was on main. Was just having some issues with notifications so I figured I pull the latest updates - looks like I was 100+ commits behind. I also couldn't get the library to update in git control because back when I installed it had to be done with pip, so I removed that first.

sudo pip uninstall alarmdecoder

cd /opt
sudo git clone https://github.com/nutechsoftware/alarmdecoder.git
cd alarmdecoder
sudo python setup.py install

After that, everything worked perfectly fine, but when I pulled those 100+ updates, then I got the error.

With those two lines commented out (I think its not returning anything) everything actually seems to work fine now, so I've fixed my issue. The files in question are new though, within the last 30 days, so I'm wondering if I should wait and pull later.

--- Bill
billfor
newt
newt
 
Posts: 14
Joined: Wed Mar 01, 2017 4:32 pm

Re: error after updating

Postby mathewss » Tue Feb 19, 2019 11:49 am

I think this problem is due to the settings for the 'Custom' notification screen having been changed over time and you have an existing notification setup that lacked the new fields. This problem will continue to pop up so I think what I can do in the short term is look at the new Matrix.org notification and see how I can deal with changes as I add them. I plan on adding more settings entries as I expand the features of the this notification module.

If you go into your Custom notification and hit SAVE again I would hope that you could remove the comments so you can pull updates again.

Please test this and let me know.

Best
Sean M
mathewss
Moderator
Moderator
 
Posts: 34
Joined: Fri Dec 06, 2013 11:14 am

Re: error after updating

Postby mathewss » Tue Feb 19, 2019 12:40 pm

OK I will apply this patch to dev it should not cause this error when you update. You can test if you want by replacing them and do a manual update with git when we release this change. The rule is simple if anyone adds or changes a setting after it is in production then it must be validated as being None.
self.auth_username = obj.get_setting('auth_username', default='')
self.auth_password = obj.get_setting('auth_password', default='')
mathewss
Moderator
Moderator
 
Posts: 34
Joined: Fri Dec 06, 2013 11:14 am

Re: error after updating

Postby billfor » Wed Feb 20, 2019 9:29 am

OK I am in the middle of upgrading the o/s from jessie to stretch. Will do this shortly as soon as I am complete.
billfor
newt
newt
 
Posts: 14
Joined: Wed Mar 01, 2017 4:32 pm

Re: error after updating

Postby billfor » Wed Feb 20, 2019 5:01 pm

OK I went into the UI and resaved one custom notifcation, and deleted the other. And re-enabled the lines that were giving me the error, and everything worked. So it was the custom notification.

After that, I added your updated lines and those seem to work fine too.

However it looks like they removed support for gunicorn systemd from debian stretch, so I had to start it manually. I will create another topic for this.

Thanks for you help!
billfor
newt
newt
 
Posts: 14
Joined: Wed Mar 01, 2017 4:32 pm

Re: error after updating

Postby mathewss » Wed Feb 20, 2019 5:57 pm

Check my recent work on the recipe to build this on Raspbian stretch.

This is on dev and recent so if you have updates let me know.

https://github.com/nutechsoftware/alarm ... p/tree/dev
Enable gunicorn server and set to start at boot

Best
Sean M
mathewss
Moderator
Moderator
 
Posts: 34
Joined: Fri Dec 06, 2013 11:14 am


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron