« Back to Search  |  Reader Mode  |  Switch to Full Retro Site View Links: Stay in Reader  |  Retro Mode: ON  |  Original »
GitHub · Extracted in 973 ms

Not possible to create note in issue · Issue #1477 · python-gitlab/python-gitlab

Source: https://github.com/python-gitlab/python-gitlab/issues/1477

Repository navigation

Not possible to create note in issue  #1477


New issue

New issue

Closed
#1486
Closed
Not possible to create note in issue #1477 #1486 Labels
support

Description

@Cynerd's profile Cynerd opened on May 27, 2021

Description of the problem, including code/CLI snippet

I am unable to create notes. I am simply trying to do:

    project = ctx.projects.get(265)
    issue = project.issues.get(729)
    issue.notes.create({'body': 'note content'})

(Lifted pretty much strait from documentation)

Expected Behavior

Note is posted

Actual Behavior

An exception is thrown:

Traceback (most recent call last):
  File "./turris-os-milestone-rename.py", line 60, in <module>
    main()
  File "./turris-os-milestone-rename.py", line 20, in main
    issue.notes.create({'body': 'note content'})
  File "/usr/lib/python3.8/site-packages/gitlab/exceptions.py", line 287, in wrapped_f
    return f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/gitlab/mixins.py", line 325, in create
    return self._obj_cls(self, server_data)
  File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 62, in __init__
    self._create_managers()
  File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 151, in _create_managers
    manager = cls(self.manager.gitlab, parent=self)
  File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 290, in __init__
    self._computed_path = self._compute_path()
  File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 305, in _compute_path
    data = {
  File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 306, in <dictcomp>
    self_attr: getattr(self._parent, parent_attr, None)
  File "/usr/lib/python3.8/site-packages/gitlab/base.py", line 80, in __getattr__
    value = self.__dict__["_attrs"][name]
TypeError: list indices must be integers or slices, not str

Specifications

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

Metadata

Metadata

Assignees

No one assigned

    Labels


    support

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions