You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python ckg/graphdb_builder/builder/create_user.py -u test -d test -n test -p 1 -a self
A user node is indeed created in the graph, however the logging messages show this:
Creating user in the database
New user node created: test2. Result: <neo4j.work.result.Result object at 0x7f9fef3184d0>
Done
The function stack is as follows: create_user_from_command_line->create_user->create_user_node->create_user_from_dict->commitQuery
After adding a print message in commitQuery, one can see that the result contains the result from the query.
def commitQuery(driver, query, parameters={}):
# result = None
try:
with driver.session() as session:
result = session.run(query, parameters)
print('Peek Result', result.peek())
return result
Creating user in the database
Peek Result <Record User_nodes=1>
However the result object is never returned to the original call.
for q in query.split(';')[-2:-1]:
try:
result = connector.commitQuery(driver, q+';', parameters=data)
print('Peek Result', result.peek())
logger.info("New user node created: {}. Result: {}".format(data['username'], result))
print("New user node created: {}. Result: {}".format(data['username'], result.peek()))
This results in the final log output like this:
Creating user in the database
Peek Result <Record User_nodes=1>
Peek Result None
New user node created: test. Result: None
Done
Expected behavior
If the response is returned correctly, the second log message 'Peek Result' should also be <Record User_nodes=1>. And the log message 'New user node created: ' should not be None as well.
The text was updated successfully, but these errors were encountered:
When creating a user from the command line-
python ckg/graphdb_builder/builder/create_user.py -u test -d test -n test -p 1 -a self
A user node is indeed created in the graph, however the logging messages show this:
Creating user in the database
New user node created: test2. Result: <neo4j.work.result.Result object at 0x7f9fef3184d0>
Done
The function stack is as follows: create_user_from_command_line->create_user->create_user_node->create_user_from_dict->commitQuery
After adding a print message in commitQuery, one can see that the result contains the result from the query.
Creating user in the database
Peek Result <Record User_nodes=1>
However the result object is never returned to the original call.
This results in the final log output like this:
Creating user in the database
Peek Result <Record User_nodes=1>
Peek Result None
New user node created: test. Result: None
Done
Expected behavior
If the response is returned correctly, the second log message 'Peek Result' should also be <Record User_nodes=1>. And the log message 'New user node created: ' should not be None as well.
The text was updated successfully, but these errors were encountered: