0

I'm using eclipse behind a proxy server, and I have the correct proxy information setup in the Preferences->General->Network Connections

HTTP HTTPS

I know this is working because I can use the Help->Check for Updates, or Help->Install New Software.

However when I try and do some basic python code to get data from Quandl, I keep getting this weird error:

QUANDL_API_URL = 'https://www.quandl.com/api/v1/'
url = QUANDL_API_URL + 'datasets/{}.csv?'.format("FRED/GDP")

in this case url =

https://www.quandl.com/api/v1/datasets/FRED/GDP.csv?

I know this is correct, because you can get to that URL in chrome and download the csv file, and then I am reading it in python using:

import pandas as pd
data = pd.read_csv(url, index_col=1)

and I am getting the following stack trace:

URLError: <urlopen error [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

Is there something weird I need to do in Eclipse to get this to function? Disclosure using another IDE like Canopy, this works fine, without errors. Any clue?

Thanks -

user1772250
  • 319
  • 5
  • 15

1 Answers1

0

Assuming you are using Windows, this is could be a configuration issue (environmental variable HTTP_PROXY may be a good place to start).

As a work-around, I would consider using something like urllib2 to get the CSV and passing that into read_csv instead of passing in the URL directly.

This answer seems appropriate for you: Using an HTTP PROXY - Python

Community
  • 1
  • 1
Benji
  • 71
  • 5