I am trying to open a database using pyorient in orientdb which was configured and started in distributed mode. But the opening of database is not happening as the process is not completing as well as not throwing any error. I am able to open and access the nodes using the HTTP port - 2480. But when I try to use the binary port - 2424, I am getting this issue.
import pyorient
client = pyorient.OrientDB("localhost", 2424)
session_id = client.connect( "xxxx", "xxxxx")
client.db_open( "orient_poc", "xxxx", "xxxx")
How to resolve this ?
This is because of a bug in pyorient's CSV serializer. You can't connect to OrientDB in distributed mode.
The OrientSerialization.CSV can't parse the orientDB protocol and goes into an infinite loop.
There is currently a development branch on pyorient that implements the missing binary serialiser (OrientSerialization.Binary).
Install it with:
pip install https://github.com/mogui/pyorient/tarball/develop#egg=pyorient
Set your serialiser as follows:
client = pyorient.OrientDB("localhost", 2424, serialization_type=pyorient.OrientSerialization.Binary)
That worked for me.