kraft icon indicating copy to clipboard operation
kraft copied to clipboard

Failed to Parse Error

Open farif opened this issue 3 years ago • 3 comments

Describe the bug Bug is reported after installing kraft a user run the following command: 'kraft list update'

Error message [CRITICAL] Failed to parse: https://api.github.com:443/repos/unikraft/unikraft

farif avatar Jul 23 '21 08:07 farif

Hey @farif!

Could you provide a few more detaiils please about your problem, e.g. by trying with kraft -v list update.

Also, have you set your Github access token via the environmental variable UK_KRAFT_GITHUB_TOKEN ?

nderjung avatar Jul 23 '21 15:07 nderjung

Hi Alex, thank you for your prompt response. Here is the what I get after running command with 'v'

[DEBUG ] Synchronizing cache with filesystem... [INFO ] Using direct repository: http://github.com/unikraft/unikraft.git [CRITICAL] Failed to parse: https://api.github.com:443/repos/unikraft/unikraft [CRITICAL] Traceback (most recent call last): File "/home/farif/.local/lib/python3.8/site-packages/requests/models.py", line 382, in prepare_url scheme, auth, host, port, path, query, fragment = parse_url(url) File "/usr/lib/python3/dist-packages/urllib3/util/url.py", line 392, in parse_url return six.raise_from(LocationParseError(source_url), None) File "", line 2, in raise_from urllib3.exceptions.LocationParseError: Failed to parse: https://api.github.com:443/repos/unikraft/unikraft

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/farif/.local/lib/python3.8/site-packages/kraft/cmd/list/update.py", line 76, in kraft_update thread.join() File "/home/farif/.local/lib/python3.8/site-packages/kraft/util/threading.py", line 58, in join raise self.exc File "/home/farif/.local/lib/python3.8/site-packages/kraft/util/threading.py", line 49, in run self.ret = self._target(*self._args, **self._kwargs) File "/home/farif/.local/lib/python3.8/site-packages/kraft/cmd/list/provider/github.py", line 139, in target=lambda *arg: items.put(get_component_from_github(*arg)), File "/home/farif/.local/lib/python3.8/site-packages/kraft/cmd/list/provider/github.py", line 191, in get_component_from_github repo = github_api.get_repo( File "/home/farif/.local/lib/python3.8/site-packages/github/MainClass.py", line 330, in get_repo headers, data = self.__requester.requestJsonAndCheck("GET", url) File "/home/farif/.local/lib/python3.8/site-packages/github/Requester.py", line 354, in requestJsonAndCheck *self.requestJson( File "/home/farif/.local/lib/python3.8/site-packages/github/Requester.py", line 454, in requestJson return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode) File "/home/farif/.local/lib/python3.8/site-packages/github/Requester.py", line 528, in __requestEncode status, responseHeaders, output = self.__requestRaw( File "/home/farif/.local/lib/python3.8/site-packages/github/Requester.py", line 555, in __requestRaw response = cnx.getresponse() File "/home/farif/.local/lib/python3.8/site-packages/github/Requester.py", line 127, in getresponse r = verb( File "/home/farif/.local/lib/python3.8/site-packages/requests/sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "/home/farif/.local/lib/python3.8/site-packages/requests/sessions.py", line 528, in request prep = self.prepare_request(req) File "/home/farif/.local/lib/python3.8/site-packages/requests/sessions.py", line 456, in prepare_request p.prepare( File "/home/farif/.local/lib/python3.8/site-packages/requests/models.py", line 316, in prepare self.prepare_url(url, params) File "/home/farif/.local/lib/python3.8/site-packages/requests/models.py", line 384, in prepare_url raise InvalidURL(*e.args) requests.exceptions.InvalidURL: Failed to parse: https://api.github.com:443/repos/unikraft/unikraft

farif avatar Jul 23 '21 15:07 farif

Any feedback on this? I am running into the same issue, but only on one of my systems, all of which are running Linux Mint 20 Ulyana

UPDATE: I found that on the system having this issue, urllib3 1.25.8 was installed. Upgrading this to 1.26.7 corrected the issue for me.

ntwerdochlib avatar Nov 12 '21 17:11 ntwerdochlib