The line where I call the consult statement works now.
I am getting error in the assertz call…
with PrologMQI(port=4242, password="debugnow") as mqi:
with mqi.create_thread() as prolog_thread:
for edge in selected_graph_attack_paths:
command = "assertz(\"arc('" + edge + "','" + edge + "')\")"
I am able to assertz now, and I tried a simple query. It also works from the web interface I will update the rest of the queries later. Quite an improvement for today. It is already after midnight. Thank you all the supporters .
Yes, you are right, I should be using the python string interpolation. However, the problem was also caused using the assertz in a different way (previously I was using the prolog class method).