小编Aur*_*eon的帖子

Gremlin Python 无法运行事件循环

我正在运行 Gremlin Python。首先,我按照此处的说明在本地计算机中进行了安装,然后我在此处运行了该网站的代码,但此时出现以下错误:

    heading('SubgraphStrategy - just Texas airports')
    strategy = SubgraphStrategy(vertices=__.has("region","US-TX"), edges=__.hasLabel('route'))
    g2 = g.withStrategies(strategy)
    verts = g2.V().count().next()

RuntimeError: Cannot run the event loop while another loop is running
Run Code Online (Sandbox Code Playgroud)

我使用以下代码验证了与 Gremlin Server 的图形数据库的连接

%%graph_notebook_config
{
  "host": "localhost",
  "port": 8182,
  "ssl": false,
  "gremlin": {
    "traversal_source": "g"
  }
}
Run Code Online (Sandbox Code Playgroud)

我找到了一些“RuntimeError:在另一个循环运行时无法运行事件循环”的解决方案,例如 Nest_async 但后来我收到了不同的错误。

谢谢

python graph gremlin graph-notebook

2
推荐指数
1
解决办法
1622
查看次数

标签 统计

graph ×1

graph-notebook ×1

gremlin ×1

python ×1