Skip to content

Troubleshooting

Andrew Y. Chen edited this page Feb 2, 2022 · 3 revisions

Problem: Git freezes and hangs up.

This may be because the Data/ folders are on the git path. To fix this, add the following lines to .gitignore:

Signals/Data/**
Shipping/Data/**
Portfolios/Data/**

Problem: Stata does not recognize my odbc.ini file.

The problem might be the location of odbc.ini. For one of us running on a Linux server, it turns out that the proper location of odbc.ini is ~/. In other words, instead of following the WRDS cloud instructions, you might want to try:

Step 1 - Create a text file ~/.odbc.ini, and put the following text in there:

[ODBC Data Sources]
wrds-postgres = PostgreSQL

[wrds-postgres]
Driver           = PostgreSQL
Description      = Connect to WRDS on the WRDS Cloud
Database         = wrds
Username         = wrds_username
Password         = wrds_password
Servername       = wrds-pgdata.wharton.upenn.edu
Port             = 9737
SSLmode          = require

Step 2 - Change Stata's odbcmgr to unixodbc permanently and check that odbc.ini is working. Open Stata and run the following:

set odbcmgr unixodbc, perm
odbc load, exec("select * from crsp.dsf limit 10") dsn("wrds-postgres")
list

You should see some cusips and other stuff if it's working. Like the WRDS-Cloud example, in this example you should set wrdsConnection in master.do to "wrds-postgres". Note that you should only have to run set odbcmgr unixodbc, perm once. Stata should remember the next time you boot it up.

Clone this wiki locally