我收到内部500服务器错误,但网站没有崩溃。下面是控制台上出现的内容,这种情况发生在每个路由呼叫上,包括http和api。
[23/Jan/2018 16:12:49] "GET /robots.txt HTTP/1.1" 500 58587
[23/Jan/2018 16:12:49] "GET /checkout HTTP/1.1" 200 192777
Internal Server Error: /robots.txt
Traceback (most recent call last):
File "/usr/local/lib/python2.7/distpackages/django/core/handlers/exception.py",
line 41, in inner response = get_response(request)
File "/usr/local/lib/python2.7/distpackages/django/utils/deprecation.py",
line 142, in __call__ response = self.process_response(request, response)
File "/usr/local/lib/python2.7/dist-packages/django/middleware/clickjacking.py",
line 32, in process_response
if response.get('X-Frame-Options') is not None:
AttributeError: 'tuple' object has no attribute 'get'
以下是robots.txt文件的内容:
User-agent: ia_archiver
Disallow: /
User-agent: Googlebot
Disallow: /
User-agent: Slurp
Disallow: /
User-agent: MSNBot
Disallow: /
User-agent: *
Disallow: /
我不确定我应该开始研究哪些文件以追溯错误,因为我是一名独自工作的初级开发人员。你们是否善意引导我朝着正确的方向前进?