I get the following error:
Traceback (most recent call last):
File "/home/josh/pysystemtrade/sysinit/futures/repocsv_spotfx_prices.py", line 26, in
db_fx_price_data.add_fx_prices(
File "/home/josh/pysystemtrade/sysdata/fx/spotfx.py", line 176, in add_fx_prices
if self.is_code_in_data(code):
File "/home/josh/pysystemtrade/sysdata/fx/spotfx.py", line 167, in is_code_in_data
if code in self.get_list_of_fxcodes():
File "/home/josh/pysystemtrade/sysdata/fx/spotfx.py", line 234, in get_list_of_fxcodes
raise NotImplementedError(USE_CHILD_CLASS_ERROR)
NotImplementedError: You need to use a child class of fxPricesData
My workaround:
I was able to make this change to fix it. I am just learning the system/code, not sure if this is the best fix or will cause other issues.
# Old code line nine in repocsv_spotfx_prices.py
# db_fx_price_data = fxPricesData()
# Use csvFxPricesData instead of fxPricesData
db_fx_price_data = csvFxPricesData()
I am setting up a production instance and following the guide and ran into an issue. The guide mentions:
FX data: Initialise the spot FX data in MongoDB from .csv files (this will be out of date, but you will update it in a moment)
Running: pysystemtrade/blob/master/sysinit/futures/repocsv_spotfx_prices.py
I get the following error: Traceback (most recent call last): File "/home/josh/pysystemtrade/sysinit/futures/repocsv_spotfx_prices.py", line 26, in
db_fx_price_data.add_fx_prices(
File "/home/josh/pysystemtrade/sysdata/fx/spotfx.py", line 176, in add_fx_prices
if self.is_code_in_data(code):
File "/home/josh/pysystemtrade/sysdata/fx/spotfx.py", line 167, in is_code_in_data
if code in self.get_list_of_fxcodes():
File "/home/josh/pysystemtrade/sysdata/fx/spotfx.py", line 234, in get_list_of_fxcodes
raise NotImplementedError(USE_CHILD_CLASS_ERROR)
NotImplementedError: You need to use a child class of fxPricesData
My workaround: I was able to make this change to fix it. I am just learning the system/code, not sure if this is the best fix or will cause other issues.