@DraksPlay

Вылетает много ошибок Python, vk_api, longpoll, как исправить?

Exception in thread Thread-7:
Traceback (most recent call last):
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 603, in urlopen
chunked=chunked)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 1321, in getresponse
response.begin()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 296, in begin
version, status, reason = self._read_status()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал существующее подключение

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\requests\adapters.py", line 449, in send
timeout=timeout
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 641, in urlopen
_stacktrace=sys.exc_info()[2])
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\util\retry.py", line 368, in increment
raise six.reraise(type(error), error, _stacktrace)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\packages\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 603, in urlopen
chunked=chunked)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "", line 2, in raise_from
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 1321, in getresponse
response.begin()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 296, in begin
version, status, reason = self._read_status()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\http\client.py", line 257, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
FileCustom Domain by Bitlyself.runbitly.com
"C:/Users/user/PycharmProjects/way/main.py", line 131, in job_builder
write_msg(int(user_id), 'Вы завершили работу строителя! Получено: {}$'.format(cash_up))
File "C:/Users/user/PycharmProjects/way/main.py", line 22, in write_msg
vk_longpoll.method('messages.send', {'v': 5.85, 'user_id': user_id, 'message': user_msg})
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\vk_api\vk_api.py", line 602, in method
values
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\requests\sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\requests\sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\requests\sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "C:\Users\user\PycharmProjects\way\venv\lib\site-packages\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10054, None))
  • Вопрос задан
  • 42 просмотра
Пригласить эксперта
Ответы на вопрос 1
У тебя с интернетом проблема. Или бот стоял просто долго без дела, у меня такое бывает.
Ты там случайно спамом не занимаешься? А то вк мог разорвать соединение, хотя обычно в таких случаях другая ошибка.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы