How to connect from pyOrient?

Hi
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\orient.py", line 325, in connect
    return self.get_message("ConnectMessage") \

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

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

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\messages\base.py", line 24, in __init__
    sock.get_connection()

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\orient.py", line 78, in get_connection
    self.connect()

  File "C:\Users\Project\Anaconda3\lib\site-packages\pyorient\orient.py", 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

https://orientdb.com/docs/last/PyOrient-Client.html

Hi @hanzgs

the default binary port is 2424. 2480 is http port

did you try with 2424?

Thanks

Yes I have tried 2424, that too not working

@hanzgs

which error on 2424?