ncsu-landscape-dynamics / pathways-visualization-tool

Visualization tool for pathways data
0 stars 1 forks source link

Group by month gives traceback in command line ("CONFIG") #11

Open wenzeslaus opened 5 years ago

wenzeslaus commented 5 years ago

There seems to be empty string being present somewhere in the data and the dashboard does not handle that. This can probably fixed just in the data, but the dashboard should be able to deal with these anyway and perhaps even write somewhere how many records are not shown due to the null value in the given column.

dash_1     | Traceback (most recent call last):
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2309, in __call__
dash_1     |     return self.wsgi_app(environ, start_response)
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2295, in wsgi_app
dash_1     |     response = self.handle_exception(e)
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1741, in handle_exception
dash_1     |     reraise(exc_type, exc_value, tb)
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 35, in reraise
dash_1     |     raise value
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2292, in wsgi_app
dash_1     |     response = self.full_dispatch_request()
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1815, in full_dispatch_request
dash_1     |     rv = self.handle_user_exception(e)
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1718, in handle_user_exception
dash_1     |     reraise(exc_type, exc_value, tb)
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/_compat.py", line 35, in reraise
dash_1     |     raise value
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1813, in full_dispatch_request
dash_1     |     rv = self.dispatch_request()
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 1799, in dispatch_request
dash_1     |     return self.view_functions[rule.endpoint](**req.view_args)
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/dash/dash.py", line 1151, in dispatch
dash_1     |     response.set_data(self.callback_map[output]['callback'](*args))
dash_1     |   File "/usr/local/lib/python3.6/dist-packages/dash/dash.py", line 1037, in add_context
dash_1     |     output_value = func(*args, **kwargs)
dash_1     |   File "/Pathways/callbacks.py", line 38, in group_by
dash_1     |     pie_one = U.pie_value_generator(column, 'CountPer', count_pie_vals, 'Count')
dash_1     |   File "/Pathways/utils.py", line 78, in pie_value_generator
dash_1     |     result = self.convert_month_label(label_key, value_key, dict_list, name)
dash_1     |   File "/Pathways/utils.py", line 62, in convert_month_label
dash_1     |     month = CONFIG['MONTH'][str(row[label_key])[:-2]]
dash_1     | KeyError: ''
mshukuno commented 5 years ago

I don't get the same error so I don't know this KeyError problem. I checked the database to find if there are empty cells in the MON column and there is none. I need to see when you are getting this error.