Advertisement
Guest User

Untitled

a guest
Oct 7th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. OperationalErrorTraceback (most recent call last)
  2. <ipython-input-19-7f3e32379345> in <module>()
  3. ----> 1 conn = get_conn('postgres','ubuntu','password')
  4.       2 arr = fetch_data('2017-10-01','2017-10-02', conn)
  5.  
  6. <ipython-input-14-697f41c8afda> in get_conn(db, usr, password)
  7.       2
  8.       3 def get_conn(db, usr, password):
  9. ----> 4   conn = psycopg2.connect(dbname=db, user=usr, password=password)
  10.       5   return conn
  11.       6
  12.  
  13. /usr/local/lib/python2.7/dist-packages/psycopg2/__init__.pyc in connect(dsn, connection_factory, cursor_factory, **kwargs)
  14.     128
  15.     129     dsn = _ext.make_dsn(dsn, **kwargs)
  16. --> 130     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
  17.     131     if cursor_factory is not None:
  18.     132         conn.cursor_factory = cursor_factory
  19.  
  20. OperationalError: FATAL:  Peer authentication failed for user "ubuntu"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement