Skip to content

Create wiki page fails #565

Closed
Closed
@FranzForstmayr

Description

@FranzForstmayr

Description of the problem, including code/CLI snippet

Creating a wiki page fails with a TypeError. When i omit content, i get a warning about missing content.

Expected Behavior

Create a Wikipage :)

Actual Behavior

Traceback (most recent call last):
  File "/home/franz/.local/lib/python3.6/site-packages/gitlab/base.py", line 56, in __getattr__
    return self.__dict__['_updated_attrs'][name]
KeyError: '_managers'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "py-gitlab.py", line 13, in <module>
    page = project.wikis.create({'title': 'Wiki Page 1', "id" : 1, "content" : "Test123#"})
  File "/home/franz/.local/lib/python3.6/site-packages/gitlab/exceptions.py", line 242, in wrapped_f
    return f(*args, **kwargs)
  File "/home/franz/.local/lib/python3.6/site-packages/gitlab/mixins.py", line 205, in create
    return self._obj_cls(self, server_data)
  File "/home/franz/.local/lib/python3.6/site-packages/gitlab/base.py", line 41, in __init__
    self._create_managers()
  File "/home/franz/.local/lib/python3.6/site-packages/gitlab/base.py", line 100, in _create_managers
    managers = getattr(self, '_managers', None)
  File "/home/franz/.local/lib/python3.6/site-packages/gitlab/base.py", line 59, in __getattr__
    value = self.__dict__['_attrs'][name]
TypeError: list indices must be integers or slices, not str

Specifications

  • python-gitlab version: 1.5.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): sorry, i don't know. But basic communication with server works. Also getting wiki pages from server

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