Closed
Description
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