     [Answers](https://scrapfly.io/blog)   /  [python](https://scrapfly.io/blog/tag/python)   /  [How to fix python requests ConnectTimeout error?](https://scrapfly.io/blog/answers/python-requests-exception-connecttimeout)   # How to fix python requests ConnectTimeout error?

 by [Bernardas Alisauskas](https://scrapfly.io/blog/author/bernardas) Dec 19, 2022 1 min read [\#python](https://scrapfly.io/blog/tag/python) [\#requests](https://scrapfly.io/blog/tag/requests) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fpython-requests-exception-connecttimeout "Share on LinkedIn")    

 

 

`ConnectTimeout` error is seen when using Python [requests](https://pypi.org/project/requests/) module for web scraping with explicit `timeout` parameter:

python```python
import requests
connect_timeout = 0.1
read_timeout = 10
response = requests.get("http://scrapfly.io/", timeout=(connect_timeout, read_timeout))
# will raise
# ConnectTimeout: HTTPConnectionPool(host='scrapfly.io', port=80):
```



The `ConnectTimeout` exception means that the server has refused to connect with our client in the given amount of time. This could be because of technical difficulties or explicit bot blocking. Try increasing the connect timeout.

If you're encountering a lot of `ConnectTimeout` exceptions your scraper is being blocked by the website. For more on that see our guide [how to scrape without getting blocked](https://scrapfly.io/blog/posts/how-to-bypass-anti-bot-protection-when-web-scraping)

See related errors: [How to fix Python requests ReadTimeout error?](https://scrapfly.io/blog/answers/python-requests-exception-readtimeout)



 

    



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

## Explore this Article with AI

 [ ChatGPT ](https://chat.openai.com/?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fpython-requests-exception-connecttimeout) [ Gemini ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fpython-requests-exception-connecttimeout) [ Grok ](https://x.com/i/grok?text=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fpython-requests-exception-connecttimeout) [ Perplexity ](https://www.perplexity.ai/search/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fpython-requests-exception-connecttimeout) [ Claude ](https://claude.ai/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fpython-requests-exception-connecttimeout) 



 ## Related Articles

 [  

 http 

### What is HTTP 401 Error and How to Fix it

Discover the HTTP 401 error meaning, its causes, and solutions in this comprehensive guide. Learn how 401 unauthorized e...

 

 ](https://scrapfly.io/blog/posts/what-is-http-401-error-and-how-to-fix-it) [  

 http 

### Guide to SSL Errors: What do they mean and how to fix them

Overview of SSL errors - what are they, what are common issues and how to resolve them.

 

 ](https://scrapfly.io/blog/posts/guide-to-ssl-error-meaning-and-fixes) [  

 http 

### What is HTTP 422 Error? (Unprocessable Entity)

422 Unprocessable Entity error is usually caused by a semantically invalid request. Learn http error 422 causes and how ...

 

 ](https://scrapfly.io/blog/posts/what-is-http-422-error-unprocessable-entity) 

  ## Related Questions

- [ Q How to fix Python requests ReadTimeout error? ](https://scrapfly.io/blog/answers/python-requests-exception-readtimeout)
- [ Q How to fix Python requests MissingSchema error? ](https://scrapfly.io/blog/answers/python-requests-exception-missingschema)
- [ Q How to fix Python requests TooManyRedirects error? ](https://scrapfly.io/blog/answers/python-requests-exception-toomanyredirects)
- [ Q How to fix Python requests SSLError? ](https://scrapfly.io/blog/answers/python-requests-exception-sllerror)
 
  



   



 Scale your web scraping effortlessly, **1,000 free credits** [Start Free](https://scrapfly.io/register)