首页 / PYTHON / python-显示静态内容时出错
python-显示静态内容时出错
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了python-显示静态内容时出错,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2264字,纯文字阅读大概需要4分钟。
内容图文
![python-显示静态内容时出错](/upload/InfoBanner/zyjiaocheng/652/c228deb132e342e38a498ec67a64f3bd.jpg)
我有一个带有静态图像的模板.此页面的第二次调用未显示图像,并且在控制台中出现下一个错误:
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[24/Oct/2010 11:25:36] "GET /index/ HTTP/1.1" 200 20058
[24/Oct/2010 11:25:36] "GET /images/logo.png HTTP/1.1" 500 65126
[24/Oct/2010 11:25:37] "GET /index/ HTTP/1.1" 200 20058
[24/Oct/2010 11:25:37] "GET /images/logo.png HTTP/1.1" 200 6439
[24/Oct/2010 11:25:39] "GET /index/ HTTP/1.1" 200 20058
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 281, in run self.finish_response()
File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 321, in finish_response self.write(data)
File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 417, in write
self._write(data)
File "C:\Python27\lib\socket.py", line 322, in write
self.flush()
File "C:\Python27\lib\socket.py", line 301, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 284, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 562, in __init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "C:\Python27\lib\SocketServer.py", line 641, in __init__
self.finish()
File "C:\Python27\lib\SocketServer.py", line 694, in finish
self.wfile.flush()
File "C:\Python27\lib\socket.py", line 301, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in your host machine
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 38314)
----------------------------------------
我该如何解决?
解决方法:
也许您有另一个使用8000端口号的应用程序.您是否尝试过使用其他端口号?
内容总结
以上是互联网集市为您收集整理的python-显示静态内容时出错全部内容,希望文章能够帮你解决python-显示静态内容时出错所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。