Orientdb &引用;超时:超时“;使用PyOrient创建数据库时

Orientdb &引用;超时:超时“;使用PyOrient创建数据库时,orientdb,pyorient,database-create,Orientdb,Pyorient,Database Create,我有一个OrientDB的本地实例(版本:2.2.20),我将其用作图形数据库。当我试图从DB客户端实例创建新数据库时,它给出了超时错误。代码如下所示 import pyorient ####establishing connection with OrientDB client=pyorient.OrientDB('localhost',2424) session_id=client.connect('root','kavin') ####connect to database ####

我有一个OrientDB的本地实例(版本:2.2.20),我将其用作图形数据库。当我试图从DB客户端实例创建新数据库时,它给出了超时错误。代码如下所示

import pyorient

####establishing connection with OrientDB

client=pyorient.OrientDB('localhost',2424)
session_id=client.connect('root','kavin')

####connect to database
####create one when there is no database
if client.db_exists('sample_db',pyorient.STORAGE_TYPE_MEMORY):
    client.db_open('sample_db','root','kavin')
    print('db exists')

else:
    print('db doesn\'t exists')
    client.db_create('sample_db',pyorient.DB_TYPE_GRAPH,pyorient.\
                                                STORAGE_TYPE_MEMORY

Traceback (most recent call last):
File "<pyshell#67>", line 1, in <module>
.......
timeout: timed out   
导入pyorient
####与OrientDB建立连接
client=pyorient.OrientDB('localhost',2424)
session_id=client.connect('root','kavin'))
####连接到数据库
####当没有数据库时创建一个
如果client.db\u存在('sample\u db',pyorient.STORAGE\u TYPE\u MEMORY):
client.db\u open('sample\u db','root','kavin'))
打印('数据库存在')
其他:
打印('数据库不存在')
client.db\u create('sample\u db',pyorient.db\u TYPE\u GRAPH,pyorient)\
存储器类型存储器
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
.......
超时:超时

客户端对象为我提供了其他现有数据库,连接没有任何问题。请建议我处理它

您使用的是哪一版本的python和pyorient?pyorient版本2.7.12和pyorient是1.5.5uhm,我复制/粘贴了您的确切代码,正在为我工作是否与版本有关?我不这么认为,我“我在使用python 2.7.11和Pyrorient 1.5.5,你在使用哪个版本的python和Pyrorient?python 2.7.12和Pyrorient的版本是1.5.5uhm,我复制/粘贴了你的确切代码,并为我工作,这与版本是否有任何关系?我不这么认为,我在使用python 2.7.11和Pyrorient 1.5.5。”