Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: "'^GDAXI'" #87

Open
tengerye opened this issue May 22, 2022 · 3 comments
Open

Comments

@tengerye
Copy link

I used this example but unfortunately got errors. The full traceback is:

  File "/projects/quant_exp/stategies/weekdaysaligner.py", line 109, in <module>
    runstrat()
  File "/projects/quant_exp/stategies/weekdaysaligner.py", line 64, in runstrat
    cerebro.run(runonce=True, preload=True)
  File "/anaconda3/envs/cc/lib/python3.7/site-packages/backtrader/cerebro.py", line 1127, in run
    runstrat = self.runstrategies(iterstrat)
  File "/anaconda3/envs/cc/lib/python3.7/site-packages/backtrader/cerebro.py", line 1210, in runstrategies
    data._start()
  File "/anaconda3/envs/cc/lib/python3.7/site-packages/backtrader/feed.py", line 203, in _start
    self.start()
  File "/anaconda3/envs/cc/lib/python3.7/site-packages/backtrader/feeds/yahoo.py", line 361, in start
    super(YahooFinanceData, self).start()
  File "/anaconda3/envs/cc/lib/python3.7/site-packages/backtrader/feeds/yahoo.py", line 94, in start
    super(YahooFinanceCSVData, self).start()
  File "/anaconda3/envs/cc/lib/python3.7/site-packages/backtrader/feed.py", line 674, in start
    self.f = io.open(self.p.dataname, 'r')
FileNotFoundError: [Errno 2] No such file or directory: "'^GDAXI'"
@martzz
Copy link

martzz commented Dec 28, 2022

Having the same issue. It seems the yahoo API has changed again. Backtrader cannot find "CrumbStore" in the reply (yahoo.py:278):

i = txt.find('CrumbStore')

@martzz
Copy link

martzz commented Dec 29, 2022

Apparently, the crumb cookie is no longer needed by the yahoo API. So the first phase of obtaining the cookie can be discarded and the whole fetching simplified in yahoo.py.

@BlueAndRose
Copy link

Apparently, the crumb cookie is no longer needed by the yahoo API. So the first phase of obtaining the cookie can be discarded and the whole fetching simplified in yahoo.py.

Works for me just delete all the crumb related code in yahoo.py. Deleting code is always satisfying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants