title: urllib.error.URLError: <urlopen error no host given> python 3
body: <p>I have this code in python 3.4</p>
  
  <pre><code>import urllib.request
  
  
  def read_text():
      document = open(r"C:\mystuff\udacity\pruebatxt.txt")
      lec = document.read()
      document.close()
      print(lec)
      check_profanity(lec)
  
  def check_profanity (text_to_check):
      print(text_to_check)
  </code></pre>
  
  <h2>finally, i found the sollution by changing  follow line</h2>
  
  <pre><code>    lecture = urllib.request.urlopen("http://www.wdyl.com/profanity?q="+ urllib.parse.quote(text_to_check))
      output=lecture .read()
      print(output)
  
      lecture.close()
  read_text()
  </code></pre>
  
  <p>And it gives me this error: </p>
  
  <pre><code>  File "C:\Python34\lib\urllib\request.py", line 1159, in do_request_
      raise URLError('no host given')
  urllib.error.URLError: &lt;urlopen error no host given&gt;
  </code></pre>
  
  <p>What could be wrong?</p>