diff --git a/vislib/views/views.py b/vislib/views/views.py index 25e0f1d..5cb7ec0 100644 --- a/vislib/views/views.py +++ b/vislib/views/views.py @@ -50,7 +50,7 @@ def execSql(request): column = key if isinstance(row[key], bytes): print(row[key], key) - json_data[index][column] = row[key].decode('UTF-8') + json_data[index][column] = row[key].decode('UTF-8', 'ignore') else: json_data[index][column] = row[key] response = { @@ -62,7 +62,7 @@ def execSql(request): print(e) response = { 'code': 10000, - 'message': 'fail', - 'data': str(e) + 'message': str(e), + 'data': {} } return JsonResponse(response)