Tim*_*ski 6 python titan rexster
我是新手,我正试图让Titan使用Python.我已经在这一天打了一个半天,无法到达任何地方.我尝试过灯泡和rexpro-python,但似乎没什么用.
在rexpro-python中有以下代码:
from rexpro import RexProConnection
conn = RexProConnection('localhost', 8184, 'graph')
Run Code Online (Sandbox Code Playgroud)
将挂起并且服务器产生以下消息(对于titan版本0.3.2,0.3.1和0.2.1)
13/09/18 16:59:27 WARN filter.RexProMessageFilter: unsupported rexpro version: 1
Run Code Online (Sandbox Code Playgroud)
在灯泡:
from bulbs.config import Config, DEBUG
from bulbs.rexster import Graph
config = Config('http://localhost:8182/graphs/graph')
g = Graph(config)
Run Code Online (Sandbox Code Playgroud)
产生以下错误:
SystemError: ({'status': '500', 'transfer-encoding': 'chunked', 'server': 'grizzly/2.2.16', 'connection': 'close', 'date': 'Wed, 18 Sep 2013 21:06:27 GMT', 'access-control-allow-origin': '*', 'content-type': 'application/json'}, '{"message":"","error":"javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.idx() is applicable for argument types: () values: []\\nPossible solutions: is(java.lang.Object), any(), find(), any(groovy.lang.Closure), with(groovy.lang.Closure), _(groovy.lang.Closure)","api":{"description":"evaluate an ad-hoc Gremlin script for a graph.","parameters":{"rexster.returnKeys":"an array of element property keys to return (default is to return all element properties)","rexster.showTypes":"displays the properties of the elements with their native data type (default is false)","load":"a list of \'stored procedures\' to execute prior to the \'script\' (if \'script\' is not specified then the last script in this argument will return the values","rexster.offset.end":"end index for a paged set of data to be returned","rexster.offset.start":"start index for a paged set of data to be returned","params":"a map of parameters to bind to the script engine","language":"the gremlin language flavor to use (default to groovy)","script":"the Gremlin script to be evaluated"}},"success":false}')
Run Code Online (Sandbox Code Playgroud)
在Titan服务器上有类似的例外.有没有人得到这个工作?
对于 rexpro-python,您会遇到版本问题。最新版本的 RexPro Python 将连接到 TinkerPop/Rexster 2.4.0。Titan 尚不支持该版本。从 Titan 0.3.2 开始,它支持 TinkerPop 2.3.x。看起来这是 rexpro-python 兼容 2.4.0 之前的最后一次提交:
https://github.com/bdeggleston/rexpro-python/commit/3597f4ce5a4da69ec64f174aa1a064abf7524693
但您可能需要稍微查看一下提交历史记录,以确保您获得正确的提交历史记录。
Bulbs 看起来像是在调用手动索引,这是 Titan 不支持的。gremlin-users和/或areuliusgraphs邮件列表中有很多关于此的帖子。查看这篇文章并参考您的具体问题:
https://groups.google.com/forum/#!msg/gremlin-users/s7Ag1tjbxLs/nC5WjtHh6woJ
简短的回答看起来灯泡已更新以支持泰坦。也许,您仍然在某些地方存在版本不兼容的情况。