Traceback (most recent call last):


 "/home/rorym/pysystemtrade/sysdata/data_blob.py", line 117, in _add_ib_class

resolved_instance = class_object(self.ib_conn, log = log)


 "/home/rorym/pysystemtrade/sysdata/data_blob.py", line 244, in ib_conn

client_id = self.db_ib_broker_client_id.return_valid_client_id()


 "/home/rorym/pysystemtrade/sysdata/production/broker_client_id.py", line 36, in return_valid_client_id

clientid_to_use = self._get_and_lock_next_clientid()


 "/home/rorym/pysystemtrade/sysdata/production/broker_client_id.py", line 74, in _get_and_lock_next_clientid

self._lock_clientid(next_id)


 "/home/rorym/pysystemtrade/sysdata/mongodb/mongo_IB_client_id.py", line 37, in _lock_clientid

self.log.msg("Locked IB client ID %d" % next_id)


 "/home/rorym/pysystemtrade/syslogdiag/log.py", line 130, in msg

return self.log(text, msglevel=msg_level, **kwargs)


 "/home/rorym/pysystemtrade/syslogdiag/log.py", line 163, in log

log_id = self.get_next_log_id()


 "/home/rorym/pysystemtrade/sysdata/mongodb/mongo_log.py", line 46, in get_next_log_id

next_id = last_id + 1
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

Traceback (most recent call last):


 "/srv/wechat/service/venv/lib/python3.6/site-packages/starlette/endpoints.py", line 68, in __call__

raise exc from None


 "/srv/wechat/service/venv/lib/python3.6/site-packages/starlette/endpoints.py", line 59, in __call__

message = await websocket.receive()


 "/srv/wechat/service/venv/lib/python3.6/site-packages/starlette/websockets.py", line 40, in receive

message = await self._receive()


 "/srv/wechat/service/venv/lib/python3.6/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 226, in asgi_receive

data = await self.recv()


 "/srv/wechat/service/venv/lib/python3.6/site-packages/websockets/protocol.py", line 419, in recv

return_when=asyncio.FIRST_COMPLETED,


 "/usr/lib64/python3.6/asyncio/tasks.py", line 311, in wait

fs = {ensure_future(f, loop=loop) for f in set(fs)}


 "/usr/lib64/python3.6/asyncio/tasks.py", line 311, in <setcomp>

fs = {ensure_future(f, loop=loop) for f in set(fs)}


 "/usr/lib64/python3.6/asyncio/tasks.py", line 526, in ensure_future

raise TypeError('An asyncio.Future, a coroutine or an awaitable is '
TypeError: An asyncio.Future, a coroutine or an awaitable is required
