Class cast exception when logging
Closed this issue · 0 comments
chipkent commented
#Connect to the client
API_PORT = 7497
import deephaven_ib as dhib
client = dhib.IbSessionTws(host="host.docker.internal", port=API_PORT, read_only=False)
client.connect()
if client.is_connected():
print('Client connected!')
else:
raise RuntimeError("Client not connected!")
Causes:
r-Scheduler-Serial-1 | i.d.s.s.SessionState | Internal Error 'f03f716e-a54e-40de-bad9-35db10230bfd' java.lang.RuntimeException: Error in Python interpreter:
Type: <class 'deephaven.dherror.DHError'>
Value: failed to write a row. : ValueError: cannot convert a Python 'list' to a Java 'java.lang.Object'
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/ibapi-10.16.1-py3.10.egg/ibapi/client.py", line 159, in connect
self.conn.sendMsg(msg2)
File "/usr/local/lib/python3.10/dist-packages/ibapi-10.16.1-py3.10.egg/ibapi/connection.py", line 76, in sendMsg
nSent = self.socket.send(msg)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/deephaven/table_factory.py", line 186, in write_row
self._j_table_writer.logRowPermissive(values)
ValueError: cannot convert a Python 'list' to a Java 'java.lang.Object'
Line: 188
Namespace: write_row
File: /usr/local/lib/python3.10/dist-packages/deephaven/table_factory.py
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "/usr/local/lib/python3.10/dist-packages/deephaven_ib/__init__.py", line 491, in connect
File "/usr/local/lib/python3.10/dist-packages/deephaven_ib/_tws/tws_client.py", line 325, in connect
File "/usr/local/lib/python3.10/dist-packages/ibapi-10.16.1-py3.10.egg/ibapi/client.py", line 199, in connect
File "/usr/local/lib/python3.10/dist-packages/deephaven_ib/_tws/tws_client.py", line 422, in error
File "/usr/local/lib/python3.10/dist-packages/deephaven_ib/_internal/tablewriter.py", line 90, in write_row
File "/usr/local/lib/python3.10/dist-packages/deephaven_ib/_internal/tablewriter.py", line 83, in write_row
File "/usr/local/lib/python3.10/dist-packages/deephaven/table_factory.py", line 188, in write_row
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:73)
at io.deephaven.integrations.python.PythonDeephavenSession.lambda$evaluate$1(PythonDeephavenSession.java:186)
at io.deephaven.util.locks.FunctionalLock.doLockedInterruptibly(FunctionalLock.java:49)
at io.deephaven.integrations.python.PythonDeephavenSession.evaluate(PythonDeephavenSession.java:185)
at io.deephaven.engine.util.AbstractScriptSession.evaluateScript(AbstractScriptSession.java:166)
at io.deephaven.engine.util.DelegatingScriptSession.evaluateScript(DelegatingScriptSession.java:81)
at io.deephaven.engine.util.ScriptSession.evaluateScript(ScriptSession.java:106)
at io.deephaven.server.console.ConsoleServiceGrpcImpl.lambda$executeCommand$8(ConsoleServiceGrpcImpl.java:168)
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:162)
at java.lang.Thread.run(Thread.java:829)