← 返回首页
personal_access_tokens.rotate(<ID>) 'dict' object has no attribute 'token' · Issue #2836 · python-gitlab/python-gitlab · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

personal_access_tokens.rotate(<ID>) 'dict' object has no attribute 'token' #2836

New issue
New issue

Description

Description of the problem, including code/CLI snippet

When using this labrary to rotate a personal access token, there is no token attribute to the resulting dict object.

Expected Behavior

That the new token is present in the object.

Actual Behavior

Taken from:
https://python-gitlab.readthedocs.io/en/stable/gl_objects/personal_access_tokens.html

new_token = gl.personal_access_tokens.rotate(1630) print(new_token.token)
Traceback (most recent call last): File "blahblah/./rotate_token", line 12, in <module> print(new_token.token) AttributeError: 'dict' object has no attribute 'token'

Specifications

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.