AttributeError: 'int' object
Posted: Fri Jun 29, 2018 10:01 am
Using latest (2018-06-28) git sources for alarmdecoder, alarmdecoder-webapp, and ser2sock, firmware 2.2a.8.
When I try to run the diagnostics I get the following. Any tips where to look closer? I can see the serial_number.upper() call in ad2web/settings/views.py (commit 2 Nov 2016 so not that new), but I am not sure where I should look in the alarmdecoder source to see what might be missing. Unless it's an inherent python function but not in python2.7? I am not a python programmer.
When I try to run the diagnostics I get the following. Any tips where to look closer? I can see the serial_number.upper() call in ad2web/settings/views.py (commit 2 Nov 2016 so not that new), but I am not sure where I should look in the alarmdecoder source to see what might be missing. Unless it's an inherent python function but not in python2.7? I am not a python programmer.
- Code: Select all
AttributeError: 'int' object has no attribute 'upper'
Traceback (most recent call last)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/opt/alarmdecoder-webapp/ad2web/app.py", line 128, in __call__
return self.app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 758, in decorated_view
return func(*args, **kwargs)
File "/opt/alarmdecoder-webapp/ad2web/decorators.py", line 16, in decorated_function
return f(*args, **kwargs)
File "/opt/alarmdecoder-webapp/ad2web/settings/views.py", line 717, in system_diagnostics
device_settings['serial'] = current_app.decoder.device.serial_number.upper()
AttributeError: 'int' object has no attribute 'upper'