-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
bugSomething isn't workingSomething isn't working
Description
See #8.
I've seen cases where the code seems to deadlock in the cd = self._client.contract_registry.request_contract_details_blocking(contract) line below.
def get_registered_contract(self, contract: Contract) -> RegisteredContract:
"""Gets a contract that has been registered in the framework. The registered contract is confirmed to
exist in the IB system and contains a complete description of the contract.
Args:
contract (Contract): contract to search for
Returns:
A contract that has been registered with deephaven-ib.
Raises:
Exception: problem executing action.
"""
self._assert_connected()
cd = self._client.contract_registry.request_contract_details_blocking(contract)
return RegisteredContract(query_contract=contract, contract_details=cd)
Deadlock monitoring returns the following.
ERROR:ibapi.wrapper:ERROR 9 200 No security definition has been found for the request
r-Scheduler-Serial-1 | i.d.s.s.SessionState | Internal Error '4936e794-be6c-49b5-8ca2-e4e51b937818' java.lang.RuntimeException: Error in Python interpreter:
Type: <class 'Exception'>
Value: ContractRegistry.request_contract_details_blocking() timed out after 120.0 sec.
Line: 181
Namespace: request_contract_details_blocking
File: /opt/deephaven-venv/lib/python3.7/site-packages/deephaven_ib/_tws/contract_registry.py
Traceback (most recent call last):
File "<string>", line 232, in <module>
File "/opt/deephaven-venv/lib/python3.7/site-packages/deephaven_ib/__init__.py", line 643, in get_registered_contract
File "/opt/deephaven-venv/lib/python3.7/site-packages/deephaven_ib/_tws/contract_registry.py", line 181, in request_contract_details_blocking
at org.jpy.PyLib.executeCode(PyLib.java:-2)
at org.jpy.PyObject.executeCode(PyObject.java:138)
at io.deephaven.engine.util.PythonEvaluatorJpy.evalScript(PythonEvaluatorJpy.java:56)
at io.deephaven.engine.util.PythonDeephavenSession.lambda$evaluate$1(PythonDeephavenSession.java:188)
at io.deephaven.util.locks.FunctionalLock.doLockedInterruptibly(FunctionalLock.java:46)
at io.deephaven.engine.util.PythonDeephavenSession.evaluate(PythonDeephavenSession.java:187)
at io.deephaven.engine.util.AbstractScriptSession.evaluateScript(AbstractScriptSession.java:145)
at io.deephaven.engine.util.DelegatingScriptSession.evaluateScript(DelegatingScriptSession.java:71)
at io.deephaven.engine.util.ScriptSession.evaluateScript(ScriptSession.java:84)
at io.deephaven.server.console.ConsoleServiceGrpcImpl.lambda$executeCommand$8(ConsoleServiceGrpcImpl.java:187)
at io.deephaven.server.session.SessionState$ExportBuilder.lambda$submit$2(SessionState.java:1299)
at io.deephaven.server.session.SessionState$ExportObject.doExport(SessionState.java:847)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.deephaven.server.runner.DeephavenApiServerModule$ThreadFactory.lambda$newThread$0(DeephavenApiServerModule.java:157)
at java.lang.Thread.run(Thread.java:829)
It seems like TWS is not responding to some requests.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working