[gw5] darwin -- Python 3.12.12 /Users/cao/.pyenv/versions/3.12.12/bin/python3.12 tests/services/test_alpaca_orders_sync.py:113: in test_no_trips_when_position_still_open trips = compute("cuixia", date(2026, 5, 1), date(2026, 5, 1)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ = buy_at = datetime.datetime(2026, 5, 1, 14, 0, tzinfo=datetime.timezone(datetime.timedelta(days=-1, seconds=72000))) compute = ._call at 0x1281bed40> self = tests/services/test_alpaca_orders_sync.py:59: in _call return mod.compute_round_trips(account, start, end, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ account = 'cuixia' ctx = end = datetime.date(2026, 5, 1) kw = {} mod = start = datetime.date(2026, 5, 1) rtrader/services/alpaca_orders_sync.py:376: in compute_round_trips orders = list(coll.find(q, _proj).sort("filled_at", 1).batch_size(5000)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AttributeError: 'list' object has no attribute 'batch_size' _ET = _proj = {'_id': 0, 'alpaca_order_id': 1, 'client_order_id': 1, 'filled_at': 1, ...} _pytz = account_id = 'ACCT_TEST' account_nick = 'cuixia' coll = end_date = datetime.date(2026, 5, 1) lookback_days = 180 mongo = q = {'account_id': 'ACCT_TEST', 'filled_at': {'$gte': datetime.datetime(2025, 11, 2, 4, 0, tzinfo=datetime.timezone.utc), '$lt': datetime.datetime(2026, 5, 2, 3, 59, 59, tzinfo=datetime.timezone.utc)}, 'status': 'filled'} start_date = datetime.date(2026, 5, 1) symbol_filter = None win_end = datetime.datetime(2026, 5, 2, 3, 59, 59, tzinfo=datetime.timezone.utc) win_start = datetime.datetime(2025, 11, 2, 4, 0, tzinfo=datetime.timezone.utc)