我正在尝试在 PyTables 中编写一个 HDF,我目前正在我的一个线程中抛出这个运行时异常。顺便说一句,我正在锁定线程访问以在 PyTables 中编写特定表。
Exception in thread ICE_USF_T:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 551, in __bootstrap_inner
self.run()
File "C:\Users\jacob.bennett\development\MarketDataReader\IO\__init__.py", line 16, in run
self.socket.rec()
File "C:\Users\jacob.bennett\development\MarketDataReader\IO\MarketSocket.py", line 32, in rec
self.parser.parse(self.sock.recv(10240))
File "C:\Users\jacob.bennett\development\MarketDataReader\Parser\Parser.py", line 56, in parse
Interface.writeTradUpdate(TradeUpdate(instrumentId, timestamp, messageType, tradeType, price, quantity))
File "C:\Users\jacob.bennett\development\MarketDataReader\PyTablesInterface\Interface.py", line 19, in writeTradUpdate
TradeDataWrapper.updateTrade(update.getInstrumentId(), update.getTimeStamp(), price, quant, update.getYearMonth(), update.getDay())
File "C:\Users\jacob.bennett\development\MarketDataReader\PyTablesInterface\TradeDataWrapper.py", line 44, in updateTrade
file.flush()
File "C:\Python27\lib\site-packages\tables\file.py", line 2107, in flush
for path, refnode in self._aliveNodes.iteritems():
RuntimeError: dictionary changed size during iteration