In [19]: conn.execute("bg = new BatchGraph(g,VertexIDType.STRING,1000) ; bg.setVertexIdKey('vid'); bg.addVertex(1)")
Out[19]: {'_id': '1', '_properties': {'vid': 1}, '_type': 'vertex'}
In [20]: conn.execute("bg = new BatchGraph(g,VertexIDType.STRING,1000) ; bg.setVertexIdKey('vid');")
In [21]: conn.execute("bg.addVertex()")
---------------------------------------------------------------------------
RexProScriptException Traceback (most recent call last)
<ipython-input-21-b98d150752b7> in <module>()
----> 1 conn.execute("bg.addVertex()")
/usr/local/lib/python2.7/site-packages/rexpro/connection.pyc in execute(self, script, params, isolate, transaction, pretty)
246
247 if isinstance(response, messages.ErrorResponse):
--> 248 raise exceptions.RexProScriptException(response.message)
249
250 return response.results
RexProScriptException: An error occurred while processing the script for language [groovy]. All transactions across all graphs in the session have been concluded with failure: java.util.concurrent.ExecutionException: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: bg for class: Script3