Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

后台登录访问仪表盘报错 #8

Open
rootsecurity opened this issue Nov 16, 2020 · 2 comments
Open

后台登录访问仪表盘报错 #8

rootsecurity opened this issue Nov 16, 2020 · 2 comments

Comments

@rootsecurity
Copy link

点击仪表盘报错:Error: Request failed with status code 500
报错日志:
Traceback (most recent call last): File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/python3/lib/python3.7/site-packages/flask_cors/extension.py", line 165, in wrapped_function return cors_after_request(app.make_response(f(*args, **kwargs))) File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/python3/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/python3/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/export/Packages/zbn/app/handler/dashboard/view.py", line 67, in get_dashboard_exec exec_data = db.select(sql) File "/usr/local/python3/lib/python3.7/site-packages/orator/connections/connection.py", line 35, in _run e, query, bindings, wrapped File "/usr/local/python3/lib/python3.7/site-packages/orator/connections/connection.py", line 357, in _try_again_if_caused_by_lost_connection raise QueryException(query, bindings, e) orator.exceptions.query.QueryException: (1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'zbn_db.zbn_logs.create_time' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") (SQL: SELECT DATE_FORMAT(create_time, '%%m-%%d') as timex, count(id) as value FROM zbn_logs WHERE DATE(create_time) > DATE_SUB(CURDATE(), INTERVAL 7 DAY) GROUP BY DATE(create_time); (None))

@sanjinhub
Copy link
Contributor

https://www.yuque.com/zbn/docs/bfeb8f 看文档

@rootsecurity
Copy link
Author

已解决,另外,MySQL8 sql_mode供参考 sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants