pro版本Django3.0下查看数据列表返回500错误

作者:cn-jack 404 浏览 5 评论 发布时间:2019-12-17 13:45:36

bug描述

Error: Request failed with status code 500

错误日志: During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/contrib/staticfiles/handlers.py", line 68, in call return self.application(environ, start_response) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 133, in call response = self.get_response(request) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 75, in get_response response = self._middleware_chain(request) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 36, in inner response = response_for_exception(request, exc) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception return debug.technical_500_response(request, *exc_info) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/views/debug.py", line 94, in technical_500_response html = reporter.get_traceback_html() File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/views/debug.py", line 333, in get_traceback_html c = Context(self.get_traceback_data(), use_l10n=False) File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/views/debug.py", line 264, in get_traceback_data frames = self.get_traceback_frames() File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/views/debug.py", line 424, in get_traceback_frames pre_context_lineno, pre_context, context_line, post_context = self._get_lines_from_file( File "/Users/cnjack/WorkSpace/git/venv/lib/python3.8/site-packages/django/views/debug.py", line 383, in _get_lines_from_file context_line = source[lineno] IndexError: list index out of range [17/Dec/2019 13:29:54] "POST /admin/user/user/ HTTP/1.1" 500 59

重现步骤 1.登录admin后台 2.点击左侧菜单,查看list列表信息 3.

环境

1.操作系统: 2.python版本:3.8 3.django版本:django 3.0 4.simpleui版本:1.0.7

Loading...
评论列表 5条评论
社区小助手
2020-05-04 18:14:49

微笑 Python3.8 造成的问题,升级到最新版即可。

社区小助手
2020-05-04 18:14:49

有将simpleui和simplepro升级到最新版吗?我这里重新不了你遇到的问题。

cn-jack
2020-05-04 18:14:49

所有表都是这样的 应该和model admin没关系

社区小助手
2020-05-04 18:14:49

人呢

社区小助手
2020-05-04 18:14:48

model代码和admin代码也一并贴下把。