mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-13 12:00:16 +08:00
BUG: Fix price caching for tickers with '/' char
On Ubuntu (assume this is true for all posix) tickers containing a slash char ("CRD/A", "BRK/A", both valid tickers with yahoo api accessible timeseries) lead to a path error in loader.py line 286.
This commit is contained in:
committed by
Thomas Wiecki
parent
8dd74b15b2
commit
1542b41fbd
@@ -272,8 +272,9 @@ must specify stocks or indexes"""
|
||||
if stocks is not None:
|
||||
for stock in stocks:
|
||||
print(stock)
|
||||
stock_pathsafe = stock.replace(os.path.sep, '--')
|
||||
cache_filename = "{stock}-{start}-{end}.csv".format(
|
||||
stock=stock,
|
||||
stock=stock_pathsafe,
|
||||
start=start,
|
||||
end=end).replace(':', '-')
|
||||
cache_filepath = get_cache_filepath(cache_filename)
|
||||
|
||||
Reference in New Issue
Block a user