Skip to content

TypeError: %d format: a number is required, not str #716

Closed
@xarx00

Description

@xarx00

Description of the problem, including code/CLI snippet

For instance, gitlab group search --id=31 --scope projects --search XYZ ends with the error TypeError: %d format: a number is required, not str. Several other commands end up the same way.

Expected Behavior

The command succeeds.

Actual Behavior

The code fails in objects.py at line path = '/groups/%d/search' % self.get_id()

Specifications

  • python-gitlab version: 1.8.0
  • API version you are using (v3/v4): na
  • Gitlab server version (or gitlab.com): na

Fix:

Replace %d everywhere in objects.py with %s. Diff file attached:
fix.diff.zip

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