Code in Quickstart No Longer Working
-
In the quickstart, there's this bit where you initialize the datafeed for Backtrader.
datapath = os.path.join(modpath, '../../datas/orcl-1995-2014.txt') # Create a Data Feed data = bt.feeds.YahooFinanceCSVData( dataname=datapath,
This bit is broken it seems, getting FileNotFoundError. Did I forget to install something? Where do I get this 'orcl-1995-2014.txt' file?
-
Code in Quickstart No Longer Working
When has it stopped working? (Because you say that it is no longer working)
@john-hwang said in Code in Quickstart No Longer Working:
Did I forget to install something?
You didn't tell us what you installed.
@john-hwang said in Code in Quickstart No Longer Working:
This bit is broken it seems, getting FileNotFoundError
No. It's not broken. It's simply not finding the file.
@john-hwang said in Code in Quickstart No Longer Working:
datapath = os.path.join(modpath, '../../datas/orcl-1995-2014.txt')
This is the file which is not found.
@john-hwang said in Code in Quickstart No Longer Working:
Where do I get this 'orcl-1995-2014.txt' file?
You obviously copied the code from the online documentation, rather than getting the samples and the data files together from the github repository. Go there: https://github.com/backtrader/backtrader
-
Hello,
Modpath variable is the code file location.One solution is that you download and copy orcl-1995-2014.txt file to in the code file location and cleaning '../../datas/ from the code.
have nice day