Having trying to stream STATUSES for symbols, such of halts.
To start, I have subscribed successfully to those symbols as I get an error when the STATUS async runs:
for symbol in symbols:
stream.subscribe_statuses(on_status, symbol)
After I go to my on_status handler, and I believe this is where my issue is:
async def on_status(status):
symbol = status.symbol
status_message = status.status_message
logging.info("==============================================================================================")
logging.info(f"{symbol} | {status_message}")
logging.info("==============================================================================================")
The error message that I am receiving is:
Sep 27 15:21:26 error during websocket communication: 'super' object has no attribute 'S'
Sep 27 15:21:26 Traceback (most recent call last):
Sep 27 15:21:26 File "/app/.heroku/python/lib/python3.10/site-packages/alpaca_trade_api/stream.py", line 254, in _run_forever
Sep 27 15:21:26 await self._consume()
Sep 27 15:21:26 File "/app/.heroku/python/lib/python3.10/site-packages/alpaca_trade_api/stream.py", line 130, in _consume
Sep 27 15:21:26 await self._dispatch(msg)
Sep 27 15:21:26 File "/app/.heroku/python/lib/python3.10/site-packages/alpaca_trade_api/stream.py", line 381, in _dispatch
Sep 27 15:21:26 await handler(self._cast(msg_type, msg))
Sep 27 15:21:26 File "/app/alpaca.py", line 1201, in on_status
Sep 27 15:21:26 symbol = status.symbol
Sep 27 15:21:26 File "/app/.heroku/python/lib/python3.10/site-packages/alpaca_trade_api/entity_v2.py", line 135, in __getattr__
Sep 27 15:21:26 return super().__getattr__(self._reversed_mapping[key])
Sep 27 15:21:26 File "/app/.heroku/python/lib/python3.10/site-packages/alpaca_trade_api/entity.py", line 149, in __getattr__
Sep 27 15:21:26 return getattr(super(), key)
Sep 27 15:21:26 AttributeError: 'super' object has no attribute 'S'
Any help would be greatly appreciated. I must have some oversight somehwere and have looked at it for so long can’t figure out where.