| record_property = <function record_property.<locals>.append_property at 0x12beaa700>
|
| mode = <Engine_Mode.Interactive: 1>, tradingdirection = None, speed = 'normal'
|
| upload = 'none'
|
|
|
| @pytest.mark.daily
|
| @pytest.mark.month_2018_10
|
| @pytest.mark.replay_2018_10_23
|
| def test_2018_10_23_nq00(record_property, mode, tradingdirection, speed, upload):
|
| > shares, net, engine = replay_harness(
|
| "nq00",
|
| datetime.datetime(2018, 10, 23),
|
| 0,
|
| 0,
|
| tradingdirection=tradingdirection,
|
| mode=mode,
|
| speed=speed,
|
| upload=upload,
|
| )
|
|
|
| tests/daily/test_2018_10_23.py:15:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
| rtrader/replay.py:952: in replay_harness
|
| start(stock, date, rule=rule)
|
| rtrader/replay.py:295: in start
|
| require_trading_ticks(stock)
|
| rtrader/replay.py:142: in require_trading_ticks
|
| require_trading_ticks_on_date(stock, days[-3])
|
| rtrader/replay.py:82: in require_trading_ticks_on_date
|
| reset_ticks_on_date(stock, day)
|
| rtrader/replay.py:100: in reset_ticks_on_date
|
| databento.download_ticks(day, True)
|
| rtrader/utils/databento.py:142: in download_ticks
|
| data.to_df().to_pickle(
|
| ../.pyenv/versions/3.12.12/lib/python3.12/site-packages/pandas/util/_decorators.py:333: in wrapper
|
| return func(*args, **kwargs)
|
| ^^^^^^^^^^^^^^^^^^^^^
|
| ../.pyenv/versions/3.12.12/lib/python3.12/site-packages/pandas/core/generic.py:3187: in to_pickle
|
| to_pickle(
|
| ../.pyenv/versions/3.12.12/lib/python3.12/site-packages/pandas/io/pickle.py:103: in to_pickle
|
| with get_handle(
|
| ../.pyenv/versions/3.12.12/lib/python3.12/site-packages/pandas/io/common.py:749: in get_handle
|
| check_parent_directory(str(handle))
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| path = 'states/databento_data_2018-10-19.pkl'
|
|
|
| def check_parent_directory(path: Path | str) -> None:
|
| """
|
| Check if parent directory of a file exists, raise OSError if it does not
|
|
|
| Parameters
|
| ----------
|
| path: Path or str
|
| Path to check parent directory of
|
| """
|
| parent = Path(path).parent
|
| if not parent.is_dir():
|
| > raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'")
|
| E OSError: Cannot save file into a non-existent directory: 'states'
|
|
|
| ../.pyenv/versions/3.12.12/lib/python3.12/site-packages/pandas/io/common.py:616: OSError
|