I am getting this error while web scraping

http protocol error', 0, 'got a bad status line

What does it mean? And
How can I avoid this?
First line of HTTP (>1.0) Response is status line. 
This error says that your status line is broken. It can be if server response starts with non-RFC status line (i don't think it can be), and if response is version http/0.9 (no status line and headers). Server answer with HTTP/0.9 if your request (for example header lines) was broken
Check response using wireshark (or something else) and give us a bit more info about your error.
How can I avoid Http protocol error 0 while WebScraping