Как я могу решить проблему получения ошибки HTTPSConnectionPool «Максимальное количество повторов превышено с URL-адресо ⇐ Python
-
Гость
Как я могу решить проблему получения ошибки HTTPSConnectionPool «Максимальное количество повторов превышено с URL-адресо
As the title states, I continue to get this error and I have tried using a request Session object to then mount an adapter with a max retries option. Apparently it is still exceeding the retries, and I thought adding the adapter with a backoff factor would help the issue. Here is a code snippet of how I am doing this:
Does anyone see anything I am doing wrong in adding this session adapter or is there a fix that works better for this problem?
This is what I am trying currently:
session = requests.Session() retry = Retry(total=3, backoff_factor=0.5, status_forcelist=[429, 500, 502, 503, 504]) adapter = HTTPAdapter(max_retries=retry) session.mount('https://', adapter) resp = session.get("https://url.com", headers={"Authorization": f"Bearer {token}"}) Does anyone see anything I am doing wrong in adding this session adapter or is there a fix that works better for this problem?
Источник: https://stackoverflow.com/questions/780 ... es-exceeed
As the title states, I continue to get this error and I have tried using a request Session object to then mount an adapter with a max retries option. Apparently it is still exceeding the retries, and I thought adding the adapter with a backoff factor would help the issue. Here is a code snippet of how I am doing this:
Does anyone see anything I am doing wrong in adding this session adapter or is there a fix that works better for this problem?
This is what I am trying currently:
session = requests.Session() retry = Retry(total=3, backoff_factor=0.5, status_forcelist=[429, 500, 502, 503, 504]) adapter = HTTPAdapter(max_retries=retry) session.mount('https://', adapter) resp = session.get("https://url.com", headers={"Authorization": f"Bearer {token}"}) Does anyone see anything I am doing wrong in adding this session adapter or is there a fix that works better for this problem?
Источник: https://stackoverflow.com/questions/780 ... es-exceeed
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
Мобильная версия