Closed
Description
Description of the problem, including code/CLI snippet
when trying to
from gitlab import Gitlab
project=Gitlab(GITLAB_SRC).projects.get(GITLAB_PROJECT_ID)
project.files.get(file_path=PATH_TO_FILE, ref=GITLAB_REF)
where PATH_TO_FILE
is in the form of {directory}/{filename}
, client returns not found error. (see github action: https://github.com/xgui3783/python-gitlab-exmaple/actions/runs/786113706)
I suspect this is due to double escaping the /
character from:
GetMixin.get
(https://github.com/python-gitlab/python-gitlab/blob/8933113/gitlab/mixins.py#L104) andProjectFileManager.get
(python-gitlab/gitlab/v4/objects/files.py
Line 97 in 8933113
Expected Behavior
return file descriptor
Actual Behavior
not found error
Specifications
- python-gitlab version: v2.7.0
- API version you are using (v3/v4): v4
- Gitlab server version (or gitlab.com): gitlab.com