日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python里orient_从Python访问OrientDB

發布時間:2024/9/15 python 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python里orient_从Python访问OrientDB 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我想將一個> 1mn記錄的

MySQL數據庫轉換成一個圖形數據庫,因為它是一個鏈接很多的網絡類型數據. Neo4J的免費版本有一些我認為可能會遇到的限制,因此我安裝了OrientDB(Community 2.2.0)(在Ubuntu Server 16.04上)并使其正常運行.現在我需要從

Python(3.5.1)訪問它,所以我正在嘗試pyorient(1.5.2). (我嘗試使用TinkerPop,因為我最終想要使用Gremlin,并且無法讓gremlin控制臺與OrientDB交談.)

以下簡單的Python代碼,用于連接到OrientDB中的一個測試圖:

import pyorient

username="user"

password="password"

client = pyorient.OrientDB("localhost", 2424)

session_id = client.connect( username, password )

print("SessionID=",session_id)

db_name="GratefulDeadConcerts"

if client.db_exists( db_name, pyorient.STORAGE_TYPE_MEMORY ):

print("Database",db_name,"exists")

client.db_open( db_name, username, password )

else:

print("Database",db_name,"doesn't exist")

給出了一個奇怪的錯誤:

SessionID= 27

Database GratefulDeadConcerts exists

Traceback (most recent call last):

File "FirstTest.py", line 18, in

client.db_open( db_name, username, password )

File "/home/tom/MyProgs/TestingPyOrient/env/lib/python3.5/site-packages/pyorient/orient.py", line 379, in db_open

.prepare((db_name, user, password, db_type, client_id)).send().fetch_response()

File "/home/tom/MyProgs/TestingPyOrient/env/lib/python3.5/site-packages/pyorient/messages/database.py", line 141, in fetch_response

info = OrientVersion(release)

File "/home/tom/MyProgs/TestingPyOrient/env/lib/python3.5/site-packages/pyorient/otypes.py", line 202, in __init__

self._parse_version(release)

File "/home/tom/MyProgs/TestingPyOrient/env/lib/python3.5/site-packages/pyorient/otypes.py", line 235, in _parse_version

self.build = int( self.build )

ValueError: invalid literal for int() with base 10: '0 (build develop@r79d281140b01c0bc3b566a46a64f1573cb359783; 2016'

有誰知道這是什么或如何解決它?我應該真的使用TinkerPop嗎?如果是這樣的話,我會發布一個關于我與之斗爭的單獨問題.

總結

以上是生活随笔為你收集整理的python里orient_从Python访问OrientDB的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。