Hello, Trying to upload data using PyTigerGraph. Having some trouble in uploading the data.
When invoking getschema() method getting below error
HTTPError: 401 Client Error: Unauthorized for url: https://tigergraph-demo-v1.i.tgcloud.io:443/gsqlserver/gsql/schema?graph=mygraph
Connection code:
#Generate authentication token 
graph = tg.TigerGraphConnection(host="https://tigergraph-demo-v1.i.tgcloud.io", graphname="mygraph")
authToken = graph.getToken(<secret>) #secret generated in admin portal.
authToken = authToken[0]
print(f"SHHHH.... Keep this a secret. Here's your token: {authToken}")
Output:
SHHHH… Keep this a secret. Here’s your token: ***********************************
It made sure the establishment was successful. Also was able to add data using conn.upsertVertex and conn.upsertEdge method. Which is also reflected in the tgcloud.
Also while invoke conn.gsql(‘ls’) getting the below error
AuthenticationFailedException             Traceback (most recent call last)
 in 
----> 1 print(conn.gsql(‘ls’))
3 frames
/usr/local/lib/python3.7/dist-packages/pyTigerDriver/pyDriver.py in _request(self, url, content, handler, cookie, auth)
307             ret_code = response.status
308             if ret_code == 401:
 → 309                 raise AuthenticationFailedException(“Invalid Username/Password!”)
310             if handler:
311                 reader = codecs.getreader(“utf-8”)(response)
AuthenticationFailedException: Invalid Username/Password!
Versions:
Python 3.10
pyTigerGraph-1.1
pyTigerDriver-1.0.15
