New paste Repaste Download
    @pytest.mark.gapup
    def test_jnug_2021_9_9_gapup():
>       shares, net, engine = replay_harness(
            "jnug",
            datetime.datetime(2021, 9, 9),
            speed="fast",
            mode=rengine.Engine_Mode.Silent,
        )
tests/test_gap_up.py:1696:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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_2021-09-07.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
Filename: None. Size: 2kb. View raw, , hex, or download this file.

This paste expires on 2026-02-21 20:44:36.236837+00:00. Pasted through deprecated-web.