Cannot connect to my databse using pyorient


#1

Hello and thanks for setting up the new community forum. Can I use this opportunity to inquire if you sorted out the issue with the pyorient connection?

Executing
import pyorient
client = pyorient.OrientDB(“localhost”, 2424)
session_id = client.connect( “user”, “password”)
I’m getting:
Traceback (most recent call last):

File “”, line 1, in
File “/home/rony/.local/lib/python3.7/site-packages/pyorient/orient.py”, line 325, in connect
return self.get_message(“ConnectMessage”)
File “/home/rony/.local/lib/python3.7/site-packages/pyorient/orient.py”, line 540, in get_message
message_instance = _Message(self._connection)
File “/home/rony/.local/lib/python3.7/site-packages/pyorient/messages/connection.py”, line 17, in init
super( ConnectMessage, self ).init(_orient_socket)
File “/home/rony/.local/lib/python3.7/site-packages/pyorient/messages/base.py”, line 24, in init
sock.get_connection()
File “/home/rony/.local/lib/python3.7/site-packages/pyorient/orient.py”, line 78, in get_connection
self.connect()
File “/home/rony/.local/lib/python3.7/site-packages/pyorient/orient.py”, line 103, in connect
" is not supported yet by this client.", [])
pyorient.exceptions.PyOrientWrongProtocolVersionException: Protocol version 37 is not supported yet by this client.

This is a recurrent problem as here:

Please let us know if you intend to support this issue or other driver/option to connect to OrientDB from Python, Thanks


#2

That issue hasn’t been sorted out yet, in the meantime you could try commenting out the supported_protocol as suggested here.


#3

I changed SUPPORTED_PROTOCOL in constants.py from 36 to 37 as recommended and got:

PyOrientDatabaseException: com.orientechnologies.orient.core.exception.OConfigurationException - You can use connect as first operation only for protocol < 37 please use handshake for protocol >= 37

How should I proceed?


#4

I’ve edited that link since it brought back to this page, it should be https://github.com/orientechnologies/pyorient/issues/27#issuecomment-410819253