Skip to content

Error in loop #2

@mk1564

Description

@mk1564

Hi,

Thank you very much for sharing this nice code. I am trying to use loop to get ALFRED data using your function. At some point in the loop, I get error message like below. When I manually execute the command at that point, it does work. Can I ask why this happens? Is it because of I am extracting data from the server too fast?

Error using xmlread (line 116)
Java exception occurred:
java.io.IOException: Server returned HTTP response code: 429 for URL:
https://api.stlouisfed.org/fred/series?series_id=COMPNFB&observation_start=1949-10-01&observation_end=2015-12-02&units=lin&frequency=q&aggregation_method=avg&realtime_start=2015-12-02&realtime_end=2015-12-02&api_key=190e4c2ccb2c648cd2cf41d0b1999b96

	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)

	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)

	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)

	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)

	at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

Error in getFredData (line 116)
xDoc=xmlread(['https://api.stlouisfed.org/fred/series?series_id=',series_id,optionstring,'&api_key=',api_key]); 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions