0

I've tried to access data from WRDS through Google Colab by using wrds.Connection() function. But I got the OperationalError. I accessed data from WRDS through Google Colab many times before but this is the first time I face this problem. I changed password, computer, browser many times but it still didn't work.

Anyone please take a look and give me a comment so that I can get through this issue. Many thanks!

Enter your WRDS username [root]:.........
Enter your password:........
WRDS recommends setting up a .pgpass file.
You can find more info here:
https://www.postgresql.org/docs/9.5/static/libpq-pgpass.html.
There was an error with your password.
---------------------------------------------------------------------------
OperationalError                          Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/sqlalchemy/engine/base.py in _wrap_pool_connect(self, fn, connection)
       3210         try:
    -> 3211             return fn()
       3212         except dialect.dbapi.Error as e:
    
83 frames
OperationalError: fe_sendauth: no password supplied
    
The above exception was the direct cause of the following exception:
    
OperationalError                          Traceback (most recent call last)
OperationalError: (psycopg2.OperationalError) fe_sendauth: no password supplied
    
(Background on this error at: http://sqlalche.me/e/14/e3q8)
    
During handling of the above exception, another exception occurred:
    
OperationalError                          Traceback (most recent call last)
OperationalError: could not translate host name "12GO@wrds-pgdata.wharton.upenn.edu" to address: Name or service not known
    
The above exception was the direct cause of the following exception:
    
OperationalError                          Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/psycopg2/__init__.py in connect(dsn, connection_factory, cursor_factory, **kwargs)
        120 
        121     dsn = _ext.make_dsn(dsn, **kwargs)
    --> 122     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
        123     if cursor_factory is not None:
        124         conn.cursor_factory = cursor_factory
    
OperationalError: (psycopg2.OperationalError) could not translate host name "12GO@wrds-pgdata.wharton.upenn.edu" to address: Name or service not known
    
(Background on this error at: http://sqlalche.me/e/14/e3q8) 
MinHaw
  • 39
  • 9

2 Answers2

0

I had no trouble. I installed the wrds library using !pip install wrds, then I ran conn = wrds.Connection(), entered my WRDS ID and password, and it all worked. One idea might be to reinstall the library and try again.

Ian Gow
  • 3,098
  • 1
  • 25
  • 31
0

I was able to get past the issue by updating wrds library using !pip install --upgrade wrds.

J4FFLE
  • 172
  • 10