How to connect from pyOrient?

I tried

from pyorient import OrientDB

client = OrientDB(“localhost”, 2480) #as the port is 2480

test1 = client.connect(“root”, “my_pwd”)

I can’t connect, getting following error, can I have some help please

test1 = client.connect("root", "my_pwd")
Traceback (most recent call last):

  File "<ipython-input-113-4cc5b94ec478>", line 1, in <module>
    test1 = client.connect("root", "my_pwd")

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\", line 325, in connect
    return self.get_message("ConnectMessage") \

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\", line 540, in get_message
    message_instance = _Message(self._connection)\

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\messages\", line 17, in __init__
    super( ConnectMessage, self ).__init__(_orient_socket)

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\messages\", line 24, in __init__

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\", line 78, in get_connection

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\", line 107, in connect
    raise PyOrientConnectionException( "Socket Error: %s" % e, [] )

PyOrientConnectionException: Socket Error: [WinError 10056] A connect request was made on an already connected socket

and why the pyorient manual says port as 2424

Hi @hanzgs

the default binary port is 2424. 2480 is http port

did you try with 2424?


Yes I have tried 2424, that too not working


which error on 2424?