Open jiechencsll opened 7 months ago
please refer to https://github.com/vesoft-inc/nebula-python/blob/master/tests/test_parameter.py
I'll prepare docs later, sorry for this :)
https://github.com/vesoft-inc/nebula-python/pull/349 should make this ux much better.
General Question query_ngql=''' MATCH (v) where v.meta.dataset_id=='$name' and v.meta.p_vid is null return v limit 1 ''' data1={"name":"dsdsdsd"} result = session_pool.execute_parameter(query_ngql, data1) 执行报错 File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/gclient/net/SessionPool.py", line 163, in execute_parameter resp = session.execute_parameter(stmt, params) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/gclient/net/Session.py", line 42, in execute_parameter resp = self._connection.execute_parameter(self._session_id, stmt, params) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/gclient/net/Connection.py", line 148, in execute_parameter resp = self._connection.executeWithParameter(session_id, stmt, params) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/graph/GraphService.py", line 1651, in executeWithParameter self.send_executeWithParameter(sessionId, stmt, parameterMap) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/graph/GraphService.py", line 1660, in send_executeWithParameter args.write(self._oprot) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/graph/GraphService.py", line 754, in write viter64.write(oprot) AttributeError: 'str' object has no attribute 'write' Exception ignored in: <function Session.del at 0x7fe400407520> Traceback (most recent call last): File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/gclient/net/Session.py", line 273, in del self.release() File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/gclient/net/Session.py", line 235, in release self._connection.signout(self._session_id) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/gclient/net/Connection.py", line 205, in signout self._connection.signout(session_id) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/graph/GraphService.py", line 1603, in signout self.send_signout(sessionId) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/graph/GraphService.py", line 1606, in send_signout self._oprot.writeMessageBegin('signout', TMessageType.CALL, self._seqid) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/fbthrift/protocol/THeaderProtocol.py", line 89, in writeMessageBegin self.__proto.writeMessageBegin(name, type, seqid) File "/usr/local/anaconda3/envs/langchain-cc/lib/python3.10/site-packages/nebula3/fbthrift/protocol/TCompactProtocol.py", line 151, in writeMessageBegin assert self.state == CLEAR AssertionError:
请问paramter这个参数应该怎么传