Skip to content

CLI: gitlab user-project list doesn't work #2558

Closed
@schaten

Description

@schaten

Description of the problem, including code/CLI snippet

gitlab user-project list --user-id 42 fails.

A similar issue has previously been reported in #881 .

Expected Behavior

List of projects owned by the current user are shown.

Actual Behavior

Impossible to list objects ('user_id') is printed.

Specifications

  • python-gitlab version: 3.14.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): GitLab Community Edition 15.11.0

Notes

So I solved my particular problem by hard-coding my user-id in gitlab/v4/objects/user.py l. 641 (in the UserProjectManager list method). Obviously not a general solution, but maybe it helps to track down the error or someone else who comes across this. :)

Furthermore, what I really don't understand is why no KeyError is raised when the format string is processed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions