5

When the code bellow is running

import requests
monitor_r = requests.get(monitor_url, proxies=proxies, timeout=60*4)

I get these exceptions:

('Connection aborted.', BadStatusLine("''",))
# and 
('Cannot connect to proxy.', error(32, 'Broken pipe')))

What are these errors and how to fix them?

f.rodrigues
  • 3,375
  • 6
  • 23
  • 59
no13bus
  • 313
  • 1
  • 3
  • 13

1 Answers1

3

This link suggests that it is caused at the httplib level.

  1. It may be caused by trying to connect to a https url using http try using https:// and see if it works...
  2. Double check your url doesn't contain any dodgy characters
  3. Check your proxy is accepting headers
Community
  • 1
  • 1
Alexander McFarlane
  • 9,832
  • 8
  • 52
  • 96