I also tried to run it through PyOrient (I have to use pyOrient unfortunately at the moment) with the following script:
from __future__ import print_function, unicode_literals
import pyorient
client = pyorient.OrientDB("localhost", 2424)
try:
client.connect(<username>, <password>)
client.db_open("df", <username>, <password>)
except:
print({"message": "Unauthorised"},403)
query = """begin;let a = insert into u_df_product content {"blah": "blah1" };let b = intest into u_df_product content {"blah": "blah2" };let c = insert into u_df_product content {"blah" : "blah3"};commit retry 100; return [$a, $b, $c];"""
print(query)
working_query = """ select from u_df_product where name = "name" """
res = client.query(working_query)
print (res)
res = client.batch(query)
print(res)
Traceback (most recent call last):
File "~/.PyCharmCE2018.1/config/scratches/scratch_2.py", line 20, in <module>
res = client.batch(query)
File "~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/orient.py", line 466, in batch
.prepare(( QUERY_SCRIPT, ) + args).send().fetch_response()
File "~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/messages/commands.py", line 144, in fetch_response
super( CommandMessage, self ).fetch_response()
File ~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/messages/base.py", line 265, in fetch_response
self._decode_all()
File "~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/messages/base.py", line 249, in _decode_all
self._decode_header()
File "~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/messages/base.py", line 176, in _decode_header
serialized_exception = self._decode_field( FIELD_STRING )
File "~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/messages/base.py", line 366, in _decode_field
_decoded_string = self._orientSocket.read( _len )
File "~/anaconda3/envs/ever/lib/python2.7/site-packages/pyorient/orient.py", line 167, in read
n_bytes = self._socket.recv_into(view, _len_to_read)
socket.timeout: timed out