I have TigerGraph v4.1.2 running in a docker container on my ubuntu machine. I am trying to connect to the instance via pyTigerGraph and have been following this youtube tutorial here - https://www.youtube.com/watch?v=sJ5o_b_9G0s
self.driver = tg.TigerGraphConnection(host=localhost, username=USERNAME, password=PASSWORD)
self.driver.graphname = GRAPHNAME
result = self.driver.gsql(‘ls’)
print(result)
self.secret = self.driver.createSecret(SECRETALIAS)
self.authToken = self.driver.getToken(self.secret)[0]
self.driver = tg.TigerGraphConnection(host=localhost, username=USERNAME, password=PASSWORD, graphname=GRAPHNAME, apiToken=self.authToken)
However, I encounter the following error on executing the ‘ls’ command on line 3 result = self.driver.gsql('ls')
and line 5 self.secret = self.driver.createSecret(SECRETALIAS)
401 Client Error: for url: [http]://127.0.0.1:14240/gsql/v1/statements
After reading off few more resources, I realized that I don’t have the graph GRAPHNAME already defined in the solution, but neither does the tutorial.
Could someone please help me?
Thank you!