FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

AttributeError: 'NoneType' object has no attribute 'replace' when doing project.mergerequests.get · Issue #1425 · python-gitlab/python-gitlab · GitHub

Repository navigation

AttributeError: 'NoneType' object has no attribute 'replace' when doing project.mergerequests.get #1425

Description

Description of the problem, including code/CLI snippet

Traceback (most recent call last):
--
File "/var/task/tagbotgitlab/tagbot.py", line 31, in handler
status, msg = 200, handle_event(json.loads(evt.get("body", "{}")))
File "/var/task/tagbotgitlab/tagbot.py", line 53, in handle_event
return handle_open(payload)
File "/var/task/tagbotgitlab/tagbot.py", line 68, in handle_open
mr = p.mergerequests.get(mr_id, lazy=True)
File "/var/task/gitlab/exceptions.py", line 279, in wrapped_f
return f(*args, **kwargs)
File "/var/task/gitlab/mixins.py", line 46, in get
id = utils.clean_str_id(id)
File "/var/task/gitlab/utils.py", line 51, in clean_str_id
return id.replace("/", "%2F").replace("#", "%23")
AttributeError: 'NoneType' object has no attribute 'replace'
STATUS : 500
ERROR : Runtime error

Expected Behavior

p.mergerequests.get(mr_id, lazy=True) should return an MR instead of throwing an error

Actual Behavior

AttributeError: 'NoneType' object has no attribute 'replace'

Specifications

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

Activity

  1. JohnVillalovos commented on Apr 28, 2021

    Member

    As a note the current version is 2.7.1. Does the issue occur with that version too?

  2. JohnVillalovos commented on Apr 29, 2021

    Member

    I created a Pull Request adding a functional test that shows in the current version that it is working.

    #1426

  3. nicoleepp commented on May 5, 2021

    Author

    Thanks, after updating to the newest version this works

  4. added 3 commits that reference this issue on Jan 4, 2022
    f788d9a
    77d76e5
    a92b55b
  5. locked as resolved and limited conversation to collaborators on May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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


      Back | FazBrowse Home | New Git URL