app.log 31.6 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
[2020-06-10 19:17:46,564] INFO in views: Logged out user admin
[2020-06-10 19:18:00,168] INFO in views: Logged in user admin
[2020-06-10 19:18:19,269] INFO in views: User admin created new application - test
[2020-06-10 19:18:47,866] INFO in views: User admin added new device dev1 test for application 0513d8d9
[2020-06-10 19:19:21,955] INFO in views: User admin created alert 7d6c9e - dev1 test.a > 0 for application 0513d8d9
[2020-06-10 19:19:32,734] INFO in views: User admin deleted alert 7d6c9e for application 0513d8d9
[2020-06-10 19:20:04,752] INFO in views: User admin created automation 14f87d - IF dev1 test.a > 0 THEN dev1 test.confID_1 = 1 for application 0513d8d9
[2020-06-10 19:20:12,716] INFO in views: User admin deleted automation 14f87d for application 0513d8d9
[2020-06-10 19:20:35,490] INFO in views: User admin deleted device 1 for application 0513d8d9
[2020-06-10 19:22:26,286] INFO in views: User admin deleted config messsage AQIxAA== for application 0513d8d9 device 1
[2020-06-10 19:26:21,369] INFO in views: User admin downloaded data for application 0513d8d9 device 1
[2020-06-10 19:26:44,083] INFO in views: User admin deleted for application 0513d8d9 device 1
[2020-06-10 19:26:58,457] INFO in views: User admin deleted application - 0513d8d9
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[2020-06-11 09:29:26,446] WARNING in views_admin: Administrator admin created new user lolo
[2020-06-11 09:39:23,858] WARNING in views_admin: Administrator admin created new user lolo
[2020-06-11 09:39:39,600] WARNING in views_admin: Administrator admin deleted user lolo
[2020-06-11 09:40:02,339] WARNING in views_admin: Administrator admin created new application 598bee34 for user-user
[2020-06-11 09:40:34,846] ERROR in views_admin: Administrator admin failed to add device application e38dc490 for user-user - INSERT has more expressions than target columns
LINE 5:         ('asd', '1', 'asd', '\x7b226d6f64656c223a20226a736f6...
                                    ^

[2020-06-11 09:41:26,391] ERROR in views_admin: Administrator admin failed to add device application e38dc490 for user-user - INSERT has more expressions than target columns
LINE 5:         ('dev1 test', '1', 'dsds', '\x7b226d6f64656c223a2022...
                                           ^

[2020-06-11 09:50:18,424] WARNING in views_admin: Administrator admin created new application 5e4932cc for user-user
[2020-06-11 09:50:36,442] WARNING in views_admin: Administrator admin added new device 1 application 5e4932cc for user-user
[2020-06-11 09:50:59,309] WARNING in views_admin: Administrator admin created alert 7d7a6d for application 5e4932cc for user-user
[2020-06-11 09:53:15,478] WARNING in views_admin: Administrator admin created alert 8b867b for application 5e4932cc for user-user
[2020-06-11 09:53:19,487] WARNING in views_admin: Administrator admin deleted alert 8b867b for application 5e4932cc for user-user
[2020-06-11 09:53:52,334] WARNING in views_admin: Administrator admin created automation 72249b for application 5e4932cc for user-user
[2020-06-11 09:54:00,999] WARNING in views_admin: Administrator admin deleted automation 72249b for application 5e4932cc for user-user
[2020-06-11 09:54:21,228] WARNING in views_admin: Administrator admin changed settings for application 5e4932cc for user-user
[2020-06-11 09:54:28,518] WARNING in views_admin: Administrator admin deleted application 5e4932cc for user-user
[2020-06-11 09:55:16,026] INFO in views: User admin created new application - test
[2020-06-11 10:01:02,029] INFO in views: User admin deleted application - 649fd3ab
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
[2020-06-30 10:56:32,460] INFO in views: Logged in superuser admin
[2020-06-30 10:57:05,008] INFO in views: Logged in superuser admin
[2020-06-30 12:36:13,017] ERROR in views: superuser admin failed to create alert for application 3b56f3d8 - 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
[2020-06-30 12:38:40,214] ERROR in views: superuser admin failed to create alert for application 3b56f3d8 - 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
[2020-06-30 12:40:31,061] ERROR in views: superuser admin failed to create alert for application 3b56f3d8 - 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
[2020-06-30 12:41:36,826] ERROR in views: superuser admin failed to create alert for application 3b56f3d8 - 'alert'
[2020-06-30 13:05:01,368] ERROR in views: superuser admin failed to create alert for application 3b56f3d8 - Exception: 'alert'
[2020-06-30 13:06:54,240] INFO in views: superuser admin created alert 884e51 - ddmjson.temperature > 0 for application 3b56f3d8
[2020-06-30 14:27:24,473] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template
    ctx.app,
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 1, in top-level template code
    {% extends 'logged_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 1, in top-level template code
    {% extends 'general_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/general_layout.html", line 35, in top-level template code
    {% block content %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 196, in block "content"
    {% block body %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 36, in block "body"
    {% for a in alert_list %}
TypeError: 'IndexError' object is not iterable
[2020-06-30 14:27:58,458] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template
    ctx.app,
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 1, in top-level template code
    {% extends 'logged_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 1, in top-level template code
    {% extends 'general_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/general_layout.html", line 35, in top-level template code
    {% block content %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 196, in block "content"
    {% block body %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 36, in block "body"
    {% for a in alert_list %}
TypeError: 'IndexError' object is not iterable
[2020-06-30 14:29:43,392] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template
    ctx.app,
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 1, in top-level template code
    {% extends 'logged_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 1, in top-level template code
    {% extends 'general_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/general_layout.html", line 35, in top-level template code
    {% block content %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 196, in block "content"
    {% block body %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 36, in block "body"
    {% for a in alert_list %}
TypeError: 'IndexError' object is not iterable
[2020-06-30 14:36:01,025] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template
    ctx.app,
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 1, in top-level template code
    {% extends 'logged_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 1, in top-level template code
    {% extends 'general_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/general_layout.html", line 35, in top-level template code
    {% block content %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 196, in block "content"
    {% block body %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 36, in block "body"
    {% for a in alert_list %}
TypeError: 'IndexError' object is not iterable
[2020-06-30 14:36:08,046] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template
    ctx.app,
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 120, in _render
    rv = template.render(context)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 1, in top-level template code
    {% extends 'logged_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 1, in top-level template code
    {% extends 'general_layout.html' %}
  File "/home/pi/thso.server/app/app/templates/general_layout.html", line 35, in top-level template code
    {% block content %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/logged_layout.html", line 196, in block "content"
    {% block body %} {% endblock %}
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 36, in block "body"
    {% for a in alert_list %}
TypeError: 'IndexError' object is not iterable
[2020-06-30 16:52:38,747] INFO in views: superuser admin deleted alert 884e51 for application 3b56f3d8
[2020-06-30 16:52:41,086] INFO in views: superuser admin deleted alert 7201c2 for application 3b56f3d8
[2020-06-30 17:02:58,029] ERROR in app: Exception on /application/3b56f3d8/device/1/download-csv [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 332, in application_device_download_csv
    f.write(str(row[2][v]))
TypeError: memoryview: invalid slice key
[2020-06-30 17:10:07,673] ERROR in app: Exception on /recent-activity [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/views.py", line 366, in recent_activity
    ra += '<tr><th scope="row">'+r[1]+'</th><th>'+r[2]+'</th><th>'+r[0]+'</th><th>'+str(ddm.read_data(r[3], dev[3]))+'</th></tr>'
  File "./app/helpers/device_data_model.py", line 147, in read_data
    return json.loads(data.decode('utf-8'))
AttributeError: 'memoryview' object has no attribute 'decode'
[2020-06-30 17:17:18,567] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 138, in render_template
    ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 930, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 883, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 857, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/loaders.py", line 127, in load
    code = environment.compile(source, name, filename)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 638, in compile
    self.handle_exception(source=source_hint)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 41, in template
    <th> {{ a[5]|split('_')[1] }} </th>
jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got '['
[2020-06-30 17:17:44,630] ERROR in app: Exception on /application/3b56f3d8/alerts [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/helpers/decorators.py", line 35, in protected_function
    return f(*args, **kwargs)
  File "./app/views.py", line 495, in application_alerts
    return render_template('new/public/alerts.html', alert_list=alerts[1], app=ap[1])
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/templating.py", line 138, in render_template
    ctx.app.jinja_env.get_or_select_template(template_name_or_list),
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 930, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 883, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 857, in _load_template
    template = self.loader.load(self, name, globals)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/loaders.py", line 127, in load
    code = environment.compile(source, name, filename)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 638, in compile
    self.handle_exception(source=source_hint)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/thso.server/app/app/templates/new/public/alerts.html", line 41, in template
    <th> {{ a[5]|split('_')[1] }} </th>
jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got '['
[2020-06-30 17:18:31,111] INFO in views: superuser admin created alert 8bbd83 - devmpack.lever == 1 for application 3b56f3d8
[2020-06-30 17:19:11,846] INFO in views: superuser admin created alert ddb142 - ddmjson.lever == 0 for application 3b56f3d8
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
[2020-06-30 17:41:15,560] ERROR in app: Exception on /administration/admin/recent-activity [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/views_admin.py", line 518, in administration_user_recent_activity
    ra += '<tr><th scope="row">'+r[1]+'</th><th>'+r[2]+'</th><th>'+r[0]+'</th><th>'+str(ddm.read_data(r[3], dev[3]))+'</th></tr>'
  File "./app/helpers/device_data_model.py", line 147, in read_data
    return json.loads(data.decode('utf-8'))
AttributeError: 'memoryview' object has no attribute 'decode'
[2020-06-30 17:44:34,584] WARNING in views_admin: Administrator admin created alert 7ab5c9 for application 3b56f3d8 for admin
[2020-06-30 17:52:07,946] WARNING in views_admin: Administrator admin created alert 3235b2 for application 3b56f3d8 for admin
[2020-06-30 17:52:27,874] WARNING in views_admin: Administrator admin deleted alert 3235b2 for application 3b56f3d8 for admin
Vladislav Rykov's avatar
Vladislav Rykov committed
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
[2020-07-02 08:31:28,405] ERROR in app: Exception on /recent-activity [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/views.py", line 366, in recent_activity
    ra += '<tr><th scope="row">'+r[1]+'</th><th>'+r[2]+'</th><th>'+r[0]+'</th><th>'+str(ddm.read_data(r[3], dev[3]))+'</th></tr>'
  File "./app/helpers/device_data_model.py", line 147, in read_data
    return json.loads(data.decode('utf-8'))
AttributeError: 'memoryview' object has no attribute 'decode'
[2020-07-02 08:31:37,913] ERROR in app: Exception on /recent-activity [GET]
Traceback (most recent call last):
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/thso.server/env/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./app/helpers/decorators.py", line 23, in restricted_function
    return f(*args, **kwargs)
  File "./app/views.py", line 366, in recent_activity
    ra += '<tr><th scope="row">'+r[1]+'</th><th>'+r[2]+'</th><th>'+r[0]+'</th><th>'+str(ddm.read_data(r[3], dev[3]))+'</th></tr>'
  File "./app/helpers/device_data_model.py", line 147, in read_data
    return json.loads(data.decode('utf-8'))
AttributeError: 'memoryview' object has no attribute 'decode'