我在Django应用程序中添加Amazon S3时遇到问题,并且服务器不断返回“未设置值错误要求的参数名称”。请获得帮助,因为我即将退出。再次查看一下追溯网址正因为如此,请帮助我,我现在是沮丧之王。
ValueError at /app/
Required parameter name not set
Request Method: GET
Request URL: http://127.0.0.1:8000/app/
Django Version: 2.0.13
Exception Type: ValueError
Exception Value:
Required parameter name not set
Exception Location: C:\Python34\lib\site-
packages\boto3\resources\base.py in __init__, line 119
Python Executable: C:\Python34\python.exe
Python Version: 3.4.4
Python Path:
['C:\\Users\\Mustapha\\Desktop\\Myfirstapp',
'C:\\WINDOWS\\SYSTEM32\\python34.zip',
'C:\\Python34\\DLLs',
'C:\\Python34\\lib',
'C:\\Python34',
'C:\\Python34\\lib\\site-packages']
Server time: Wed, 11 Sep 2019 01:20:16 +0000
模板
未设置必需参数:
<img src="{{Blogger.image.url}}" width="70" height="70" class="c" />
回溯:
Traceback (most recent call last):
File "C:\Python34\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "C:\Python34\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Python34\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Python34\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "C:\Python34\lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "C:\Python34\lib\wsgiref\handlers.py", line 453, in _write
self.stdout.write(data)
File "C:\Python34\lib\socket.py", line 398, in write
return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
[11/Sep/2019 12:24:51] "GET /app/ HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 64131)
Traceback (most recent call last):
File "C:\Python34\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "C:\Python34\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Python34\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Python34\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "C:\Python34\lib\wsgiref\handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "C:\Python34\lib\wsgiref\handlers.py", line 453, in _write
self.stdout.write(data)
File "C:\Python34\lib\socket.py", line 398, in write
return self._sock.send(b)
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\wsgiref\handlers.py", line 141, in run
self.handle_error()
File "C:\Python34\lib\site-packages\django\core\servers\basehttp.py", line 86, in handle_error
super().handle_error()
File "C:\Python34\lib\wsgiref\handlers.py", line 368, in handle_error
self.finish_response()
File "C:\Python34\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Python34\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Python34\lib\wsgiref\handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "C:\Python34\lib\wsgiref\handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python34\lib\socketserver.py", line 617, in process_request_thread
self.finish_request(request, client_address)
File "C:\Python34\lib\socketserver.py", line 344, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python34\lib\socketserver.py", line 673, in __init__
self.handle()
File "C:\Python34\lib\site-packages\django\core\servers\basehttp.py", line 154, in handle
handler.run(self.server.get_app())
File "C:\Python34\lib\wsgiref\handlers.py", line 144, in run
self.close()
File "C:\Python34\lib\wsgiref\simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'