Greetings:
I am new to TigerGraph. I have it installed as a docker image on my windows laptop and I can get into GraphStudio, GSQL prompt etc. I have installed pyTigerGraph and while trying to get a Token, I am getting the following error. Please advise.
Connection parameters
hostName = “http://localhost:14240”
secret = conn.createSecret()
#token = conn.getToken(secret=secret, setToken=True, lifetime=None)[0]
token = conn.getToken(secret=secret)[0]
LocationParseError Traceback (most recent call last)
~\anaconda3\lib\site-packages\requests\models.py in prepare_url(self, url, params)
379 try:
→ 380 scheme, auth, host, port, path, query, fragment = parse_url(url)
381 except LocationParseError as e:
~\anaconda3\lib\site-packages\urllib3\util\url.py in parse_url(url)
391 except (ValueError, AttributeError):
→ 392 return six.raise_from(LocationParseError(source_url), None)
393
~\anaconda3\lib\site-packages\urllib3\packages\six.py in raise_from(value, from_value)
LocationParseError: Failed to parse: http://localhost:14240:9000/requesttoken?secret=xxx
During handling of the above exception, another exception occurred:
InvalidURL Traceback (most recent call last)
in
5
6 #token = conn.getToken(secret=secret, setToken=True, lifetime=None)[0]
----> 7 token = conn.getToken(secret=secret)[0]
~\anaconda3\lib\site-packages\pyTigerGraph\pyTigerGraph.py in getToken(self, secret, setToken, lifetime)
1378 “&lifetime=” + str(lifetime) if lifetime else “”)).text)
1379 else:
→ 1380 res = json.loads(requests.request(“GET”, self.restppUrl + “/requesttoken?secret=” + secret + (
1381 “&lifetime=” + str(lifetime) if lifetime else “”),verify=False).text)
1382 if not res[“error”]:
~\anaconda3\lib\site-packages\requests\api.py in request(method, url, **kwargs)
59 # cases, and look like a memory leak in others.
60 with sessions.Session() as session:
—> 61 return session.request(method=method, url=url, **kwargs)
62
63
~\anaconda3\lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
514 hooks=hooks,
515 )
→ 516 prep = self.prepare_request(req)
517
518 proxies = proxies or {}
~\anaconda3\lib\site-packages\requests\sessions.py in prepare_request(self, request)
447
448 p = PreparedRequest()
→ 449 p.prepare(
450 method=request.method.upper(),
451 url=request.url,
~\anaconda3\lib\site-packages\requests\models.py in prepare(self, method, url, headers, files, data, params, auth, cookies, hooks, json)
312
313 self.prepare_method(method)
→ 314 self.prepare_url(url, params)
315 self.prepare_headers(headers)
316 self.prepare_cookies(cookies)
~\anaconda3\lib\site-packages\requests\models.py in prepare_url(self, url, params)
380 scheme, auth, host, port, path, query, fragment = parse_url(url)
381 except LocationParseError as e:
→ 382 raise InvalidURL(*e.args)
383
384 if not scheme:
InvalidURL: Failed to parse: http://localhost:14240:9000/requesttoken?secret=xxx