Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Deleting a label fails with 404 #1867

Copy link
Copy link
@just-doit

Description

@just-doit
Issue body actions

Description of the problem, including code/CLI snippet

I'm trying to delete all labels from a given project using this code:

# connect to Gitlab
gl = gitlab.Gitlab(GITLAB_URL, private_token=GITLAB_TOKEN)
gl.auth()

# Get GitLab project
gl_project = gl.projects.get(GITLAB_PROJECT_ID)

# delete ALL labels
for gl_label in gl_project.labels.list(all=True):
    gl_label.delete()

The token works since I've used it successfully to do some other API calls before. The same user is able to delete labels manually via Web-UI.

Expected Behavior

I would expect the code not to throw a `gitlab.exceptions.GitlabDeleteError: 404: 404 Label Not Found'

Actual Behavior

The delete call fails with a gitlab.exceptions.GitlabDeleteError: 404: 404 Label Not Found.

Specifications

  • python-gitlab version: 3.1.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): GitLab Enterprise Edition 14.5.0-ee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.