D
D
Diweber2020-05-08 17:58:10
Django
Diweber, 2020-05-08 17:58:10

ConnectionResetError: [WinError 10054] Did the remote host forcibly terminate an existing connection?

Hello. This error is thrown in the console. I can't figure out what's wrong, please help. When you click on the link to this page, at first everything is OK, but then if you click on the video or reload the page, go to another page, such an error occurs. I will be very grateful for your help.
******************************************************* *****
views.py
....

def videopost(request):
"""Renders the videopost page."""
assert isinstance(request, HttpRequest) #пытался без этой строки все равно вылетает такая ошибка
return render(
request,
'app/videopost.html',
{
'title':'Видео',
'message':'Лучшие видео',
'year':datetime.now().year,
}
)


******************************************************* *****
videopost.html

{% extends "app/layout.html" %}
{% load staticfiles %}
{% block content %}

My Christmas Tree - Номинация на лучшее видео
<VIDEO controls="controls" width="480" height="300" poster="/media/video.jpg">
        <source src="/media/My-Christmas-Tree.mp4" type="video/mp4" />
    </VIDEO>
</div>
<div>
    <h3> Kazka Plakala </h3>
    <VIDEO src="/media/Kazka-plakala.mp4" type="video/mp4" poster="/media/Kazka-poster.jpg" controls="controls" width="480" height="275" />

</div>
{% endblock %}


******************************************************* *****
CONSOLE:

The settings.py file is in its original state.

"GET /videopost/ HTTP/1.1" 200 2647
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 54230)
Traceback (most recent call last):
File "C:\Users\Dimon\AppData\Local\Programs\Python\Python37\lib\socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "C:\Users\Dimon\AppData\Local\Programs\Python\Python37\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\Dimon\AppData\Local\Programs\Python\Python37\lib\socketserver.py", line 720, in __init__
self.handle()
File "C:\Users\Dimon\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
self.handle_one_request()
File "C:\Users\Dimon\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "C:\Users\Dimon\AppData\Local\Programs\Python\Python37\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал существующее подключениете,

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question