请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Error occured while trying to proxy to: localhost:8080/

在修改个人信息时浏览器返回了下面的错误
Error occured while trying to proxy to: localhost:8080/
pycharm后台输出了

[29/Feb/2020 16:52:41] "PATCH /users/1/ HTTP/1.1" 200 100
Traceback (most recent call last):
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 332, in send_headers
    self.send_preamble()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 255, in send_preamble
    ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\socketserver.py", line 775, in write
    self._sock.sendall(b)
ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。
[29/Feb/2020 16:52:41] "PATCH /users/1/ HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 61786)
Traceback (most recent call last):
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 332, in send_headers
    self.send_preamble()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 255, in send_preamble
    ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\socketserver.py", line 775, in write
    self._sock.sendall(b)
ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 141, in run
    self.handle_error()
  File "C:\Users\xiao_\Envs\mxshop\lib\site-packages\django\core\servers\basehttp.py", line 116, in handle_error
    super().handle_error()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 368, in handle_error
    self.finish_response()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 331, in send_headers
    if not self.origin_server or self.client_is_modern():
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\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:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\socketserver.py", line 639, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\socketserver.py", line 361, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\socketserver.py", line 696, in __init__
    self.handle()
  File "C:\Users\xiao_\Envs\mxshop\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
    self.handle_one_request()
  File "C:\Users\xiao_\Envs\mxshop\lib\site-packages\django\core\servers\basehttp.py", line 194, in handle_one_request
    handler.run(self.server.get_app())
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\handlers.py", line 144, in run
    self.close()
  File "C:\Users\xiao_\Envs\mxshop\lib\site-packages\django\core\servers\basehttp.py", line 111, in close
    super().close()
  File "C:\Users\xiao_\AppData\Local\Programs\Python\Python36\Lib\wsgiref\simple_server.py", line 35, in close
    self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
----------------------------------------

刷新用户详情页面刚修改的数据也加载回来,不知道这个报错是什么原因。请老师指点

正在回答 回答被采纳积分+3

2回答

提问者 慕慕7077877 2020-03-20 11:14:34

添加订单的时候也会报错

0 回复 有任何疑惑可以回复我~
  • bobby #1
    TypeError: 'NoneType' object is not subscriptable 这个报错不是引起添加订单错误的原因。 还有没有其他报错信息截图我看看呢
    回复 有任何疑惑可以回复我~ 2020-03-20 13:29:38
  • 提问者 慕慕7077877 回复 bobby #2
    浏览器的请求地址会变成下面http://localhost:8080/undefined
    后端没有报错
    回复 有任何疑惑可以回复我~ 2020-03-22 15:21:50
  • bobby 回复 提问者 慕慕7077877 #3
    你留下qq 我加你看看
    回复 有任何疑惑可以回复我~ 2020-03-23 10:50:20
bobby 2020-03-15 13:14:53

只有修改个人信息才报这个错吧 其他情况下有没有这个问题?

0 回复 有任何疑惑可以回复我~
  • 老师我也遇到了同样的问题,除了修改个人信息会报这个错误,其他都是正常的
    回复 有任何疑惑可以回复我~ 2020-03-25 13:57:09
  • 我觉得好像是form表单的问题,点击按钮就会自动发送表单之类的,我把form改成section后就不会报错了
    
    (line 10 in userinfo.vue)
    <form name="formEdit" action="" method="post" >
    回复 有任何疑惑可以回复我~ 2020-05-04 01:40:51
  • 课程中有些地方逻辑是写的使用js发送。如果表单放到放到了form中就会导致发送两次 这个时候注释掉form 改成其他的html标签即可
    回复 有任何疑惑可以回复我~ 2020-05-06 08:57:49
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信