I am trying to connection WRDS using the simple code below:
import wrds
conn = wrds.Connection()
When I run the code, I am prompted for my username and password, which I type in. However, in response, I get the following error message:
OperationalError: (psycopg2.OperationalError) connection to server at "wrds-pgdata.wharton.upenn.edu" (192.168.9.200), port 9737 failed: FATAL: PAM authentication failed for user "tmohammed"
(Background on this error at: https://sqlalche.me/e/14/e3q8)`
Any ideas on how I can get around this? I am trying this on Jupyter Notebook. FYI, my WRDS account is a PhD account under the name of my university.
This could be the result of the 2FA adopted by WRDS relatively recently. You may want to SSH into WRDS from your machine and do 2FA and then check if the
wrdspackage works from the same machine after that.