Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Problem with csv_fetcher

Hi,

I am trying to use csv_fetcher with data from https://www.dropbox.com/s/peflfvy81fsfobj/report_new.csv?dl=0
I believe it is correctly formatted. Also, here is the code:

fetch_csv('https://www.dropbox.com/s/peflfvy81fsfobj/report_new.csv?dl=0',  
          date_format='%Y-%m-%d',  
          symbol='recession',  
)

I get a message that says "Exception: Error parsing remote CSV data."
What am I doing wrong?

Thanks for the help :)

5 responses

To import a file from Dropbox, the file needs to be in your Public folder and the URL looks something like:

https://dl.dropboxusercontent.com/u/169032081/fetcher_sample_file.csv  

If you don't have a Public folder, then you can use Google Drive, Copy, or another hosting tool to host the file. For more info check out the API docs.

cheers,
Alisa

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Thanks for the reply.

I tried putting it in the public folder and I also tried google drive (and made sure the file was shared with everyone) and nothing seems to work. I keep getting the same error. Do you know what the problem might be?

Thanks again

OK I managed to get it to work. I had to right click the file in Dropbox and click "copy public link". That linked worked.

Thanks

@Alisa do you have... a working sample for Google Drive... Fetching prices of stocks? thanks...

Ah, indeed you'll need the public link (from either Dropbox or Google Drive) so the algorithm can read the file.

@John I don't have a sample handy, but if you follow the steps here under "Importing Files from Google Drive" then you can read any CSV in your algo.