Skip to content

FrozenInstanceError when getting repo #17

@marticardus

Description

@marticardus

I have this code

import gogs_client
api = gogs_client.GogsApi('https://git_url')
token = gogs_client.Token('token')
print api.get_repo(token, 'orgname', 'reponame')

And i get this error

Traceback (most recent call last):
  File "t.py", line 4, in <module>
    print api.get_repo(token, 'etckeeper', 'git')
  File "/usr/local/lib/python2.7/dist-packages/gogs_client/interface.py", line 179, in get_repo
    return GogsRepo.from_json(response.json())
  File "/usr/local/lib/python2.7/dist-packages/gogs_client/entities.py", line 39, in from_json
    o = cls(*args, **kwargs)
  File "<attrs generated init 64b963a8d33c4c43d9b897b84b6094551249f4ec>", line 19, in __init__
  File "/usr/local/lib/python2.7/dist-packages/attr/_make.py", line 483, in _convert
    setattr(inst, a.name, a.convert(getattr(inst, a.name)))
  File "/usr/local/lib/python2.7/dist-packages/attr/_make.py", line 156, in _frozen_setattrs
    raise FrozenInstanceError()
attr.exceptions.FrozenInstanceError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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