gitlabber
gitlabber copied to clipboard
python 3.8 errors
I am running python 38 and receive the following errors when trying to pull a repo with gitlabber.
My call - gitlabber -t ***** -u https://gitlab..... -p
Traceback (most recent call last):
File "c:\python38\lib\site-packages\gitlab\__init__.py", line 795, in _query
self._data = result.json()
File "c:\python38\lib\site-packages\requests\models.py", line 898, in json
return complexjson.loads(self.text, **kwargs)
File "c:\python38\lib\json\__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "c:\python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "c:\python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Python38\Scripts\gitlabber.exe\__main__.py", line 9, in <module>
File "c:\python38\lib\site-packages\gitlabber\cli.py", line 27, in main
tree.load_tree()
File "c:\python38\lib\site-packages\gitlabber\gitlab_tree.py", line 95, in load_tree
self.load_gitlab_tree()
File "c:\python38\lib\site-packages\gitlabber\gitlab_tree.py", line 78, in load_gitlab_tree
groups= self.gitlab.groups.list(as_list=False)
File "c:\python38\lib\site-packages\gitlab\exceptions.py", line 275, in wrapped_f
return f(*args, **kwargs)
File "c:\python38\lib\site-packages\gitlab\mixins.py", line 141, in list
obj = self.gitlab.http_list(path, **data)
File "c:\python38\lib\site-packages\gitlab\__init__.py", line 653, in http_list
return GitlabList(self, url, query_data, **kwargs)
File "c:\python38\lib\site-packages\gitlab\__init__.py", line 777, in __init__
self._query(url, query_data, **kwargs)
File "c:\python38\lib\site-packages\gitlab\__init__.py", line 797, in _query
raise GitlabParsingError(
gitlab.exceptions.GitlabParsingError: Failed to parse the server message
See this issue you need to make sure you give your token proper API access, try accessing your Gitlab's http API using your token first (via curl
)
I have exactly the same issue even with full scope permissions with gitlabber 1.1.0 and Python 3.8.2. The API token is working with the curl and displays all the projects. Also gitlab project list
displays all the projects correctly with that token.
Actually this seems to happen when Gitlab installation does not have any groups. My private installation has only users. So when I was trying to clone all the projects from a specific profile (http://gitlab.address/profile), I got the error.
After creating a group with projects inside that group and trying to clone from the root (http://gitlab.address/), cloning works. But the repos behind users are still unreachable..
Duplicate of #6