Error in mismatched columns: consuming ws messages

I am stuck on this issue. This is the code that was written in the Medium post. I have been trying to debug it. I have it to this point where it appears to get the ticker data and historical data but then hits a wall and cites mismatch columns. I’m not sure what I need to align. Any help would be appreciated.

primary@wm1:~$ python3.6 wm4_v3.txt
Getting current ticker data…
Tracking 309 symbols.
Getting historical data…
Watching 309 symbols.
ERROR:root:error while consuming ws messages: cannot set a row with mismatched columns
^CTraceback (most recent call last):
File “/home/primary/.local/lib/python3.6/site-packages/alpaca_trade_api/”, line 331, in run
File “/usr/lib/python3.6/asyncio/”, line 484, in run_until_complete
return future.result()
File “/home/primary/.local/lib/python3.6/site-packages/alpaca_trade_api/”, line 316, in consume
File “/home/primary/.local/lib/python3.6/site-packages/alpaca_trade_api/polygon/”, line 108, in cons
await self._consume_task
File “/home/primary/.local/lib/python3.6/site-packages/alpaca_trade_api/polygon/”, line 114, in _con
await self._dispatch(data)
File “/home/primary/.local/lib/python3.6/site-packages/alpaca_trade_api/polygon/”, line 221, in _dis
await handler(self, channel, ent)
File “wm4_v3.txt”, line 192, in handle_second_bar
minute_history[symbol].loc[ts] = new_data
File “/home/primary/.local/lib/python3.6/site-packages/pandas/core/”, line 670, in setitem
iloc._setitem_with_indexer(indexer, value)
File “/home/primary/.local/lib/python3.6/site-packages/pandas/core/”, line 1626, in _setitem_with_inde
self._setitem_with_indexer_missing(indexer, value)
File “/home/primary/.local/lib/python3.6/site-packages/pandas/core/”, line 1856, in _setitem_with_inde
raise ValueError(“cannot set a row with mismatched columns”)
ValueError: cannot set a row with mismatched columns
During handling of the above exception, another exception occurred:
Traceback (most recent call last):

Resolved this issue. Followed direction from the Github post.