Django项目运行时出现self.status.split(' ',1)[0], self.bytes_sent,ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。
[02/Nov/2018 09:46:51] "GET /new_industry/category HTTP/1.1" 200 2891792
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "C:\Program Files\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:\Program Files\Python36\lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "C:\Program Files\Python36\lib\socketserver.py", line 775, in write
self._sock.sendall(b)
ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。
[02/Nov/2018 09:46:51] "GET /new_industry/category HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 54843)
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 138, in run
self.finish_response()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 332, in send_headers
self.send_preamble()
File "C:\Program Files\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:\Program Files\Python36\lib\wsgiref\handlers.py", line 453, in _write
result = self.stdout.write(data)
File "C:\Program Files\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:\Program Files\Python36\lib\wsgiref\handlers.py", line 141, in run
self.handle_error()
File "C:\Program Files\Python36\lib\site-packages\django\core\servers\basehttp.py", line 86, in handle_error
super().handle_error()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 368, in handle_error
self.finish_response()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
self.write(data)
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 274, in write
self.send_headers()
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "C:\Program Files\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:\Program Files\Python36\lib\socketserver.py", line 639, in process_request_thread
self.finish_request(request, client_address)
File "C:\Program Files\Python36\lib\socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Program Files\Python36\lib\socketserver.py", line 696, in __init__
self.handle()
File "C:\Program Files\Python36\lib\site-packages\django\core\servers\basehttp.py", line 154, in handle
handler.run(self.server.get_app())
File "C:\Program Files\Python36\lib\wsgiref\handlers.py", line 144, in run
self.close()
File "C:\Program Files\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'
此原因是因为,多次刷新,ajax多次进行请求,而且请求数据过大导致
ajax默认异步请求,改成同步可以解决问题

ajax 加入一行 async : false,
Django项目运行时出现self.status.split(' ',1)[0], self.bytes_sent,ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。的更多相关文章
- Django报错:ConnectionAbortedError: [WinError 10053] 你的主机中的软件中止了一个已建立的连接。
ajax请求时加上 async : false, $.ajax({ url:"{% url 'article:article_post' %}", {#一定不要写成小写了,坑了好久 ...
- django' 前端 self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split'
form 表单 post之后 ,重新定向当前页面的get请求 这是因为,form表单提交的时候,按钮在form表单里面
- 开发必备知识点--django项目启动时,url加载之前,执行某个.py文件
django项目启动时,自定义执行某个py文件 在任意的app下的apps.py中的Config类下自定义ready()方法,并且调用autodiscover_modules. app01/apps. ...
- 易宝支付Demo,生产中封装成简洁的代付接口,不用request如何获取项目运行时的真实路径
最近项目在做融360引流,涉及到了易宝支付的代扣和代付.易宝官方给出的demo只能简单运行,而且都是通过form表单的形式提交,返回XML格式.同时接口代码都写在了JSP中看起来不友好.项目在生成中想 ...
- javaweb项目运行时生成的Servers项目作用
在javaweb项目中,看到有一个Servers的项目,发现每新增一个项目,就会在Servers项目中新生成一些对应的项目文件. 如图所示: 每个项目都有对应的文件.文件的结构图如下: 解释一:Ser ...
- django项目运行步骤
第一步: 创建gjango项目 django-admin startproject dname python manage.py startapps aname 第二部: 运行 -- 编辑设置 -- ...
- 创建Web项目运行时出小错误及解决方法
1.目录结构 2.各文件内容 index.jsp <%@ page contentType="text/html;charset=UTF-8" language=" ...
- eclipse中的项目运行时不出现run as→java application选项
eclipse中的运行java project时不出现run as→java application选项? 解决方案☞必须有正确的主方法,即public static void main(String ...
- vue-cli3项目运行时一直发http://localhost:8080/sockjs-node/info?t=1462183700002请求
报错如下图: 解决方式: 一.如果是在开发环境,应该是开发的时候网络环境变更导致,比如你切换无线网络,导致开发服务器的IP地址换了,这样开发服务器会不知道如何确定访问源.开发环境中关闭npm dev ...
随机推荐
- FTP文件传输协议两种模式 ftp协议集,错误码集,ftp客户端命令集
TCP/IP协议中,FTP标准命令TCP端口号为21,Port方式数据端口为20.FTP协议的任务是从一台计算机将文件传送到另一台计算机,它与这两台计算机所处的位置.联接的方式.甚至是是否使用相同的操 ...
- PHP封装验证类
<?php /** * Created by PhpStorm. * User: jiqing * Date: 18-7-24 * Time: 下午4:36 * 常用验证 */ class Va ...
- php代码中临时开启错误调试
对php.ini 中参数的设置 也可用在php代码中完成. 调用:调用ini_set()函数 //开启php.ini中的display_errors指令 ini_set('display_errors ...
- 使用Docker模拟ansible集群环境
/etc/ansible/hosts 192.168.99.100 ansible_ssh_port=8081 ansible_ssh_user=root 配置容器免密码SSH登录
- js操作一般文件和csv文件
js操作一般文件和csv文件 将文本文件读成字符串 <input type="file" id="upload"> document.getElem ...
- babel-preset-latest使用介绍
本文介绍babel中的babel-preset-latest插件 简介 该插件的作用是包含了每年的js代码转换规则 默认包含es2015,es2016,es2017,默认对这些代码都会进行转码,从而方 ...
- logistic回归和线性回归
1.输出: 线性回归输出是连续的.具体的值(如具体房价123万元) 回归 逻辑回归的输出是0~1之间的概率,但可以把它理解成回答“是”或者“否”(即离散的二分类)的问题 分类 2.假设函数 线性回归: ...
- 虚拟机之 LNMP
LNMP就是Linux nginx mysql php 一.mysql 下载安装mysql转至 LAMP (点击“LAMP”即可跳转) 也可以从快照跳转至mysql安装ok 二.php 下载同上, 1 ...
- 在linux中获取错误返回信息 &…
#include // void perror(const char *msg); #include // char *strerror(int errnum); #include //errno e ...
- EOFException异常的处理
TOmcat启动后报:IOException while loading persisted sessions: Java.io.EOFException错误 - IOException while ...