【发布时间】:2021-12-20 01:51:41
【问题描述】:
我尝试使用 python-gitlab 模块访问私有 GitLab 实例上的项目(请查看屏幕截图以获取版本号)。
我创建了一个对 GitLab 存储库的 Web UI 具有所有权限的访问令牌,并将此令牌复制到我的 Python 代码中:
import gitlab
gl = gitlab.Gitlab("https://MyGit.com/.../MyProject", "k1WMD-fE5nY5V-RWFb-G")
print(gl.projects.list())
Python在执行过程中抛出如下错误
Exception: GitlabParsingError (note: full exception trace is shown but execution is paused at: <module>)
Failed to parse the server message
During handling of the above exception, another exception occurred:
The above exception was the direct cause of the following exception:
File ".../app.py", line 226, in <module> (Current frame)
print(gl.projects.list())
【问题讨论】:
标签: python-3.x gitlab gitlab-api