title: PostgreSQL error when trying to connect in python : invalid dsn: invalid connection option "username"
body: <p>So I have got this task:
  You have two abstract reports made available to you on a PostgreSQL server located at: postgres://candidate.company.org/company</p>
  
  <p>username = candidate password = abc</p>
  
  <p>So I used this code to try connect to the database:</p>
  
  <pre><code>import psycopg2 as db
  conn = db.connect(host='postgres://candidate.suade.org/company', database='randomname', user='candidate', password='abc', port='5432')
  </code></pre>
  
  <p>But then i receiver error message:</p>
  
  <pre><code>ProgrammingError: invalid dsn: invalid connection option "username"
  </code></pre>
  
  <p>As the username give is correct Can anyone help?</p>