You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import gitlab
>>> gitlab.__version__
'1.3.0'
>>> gl = gitlab.Gitlab('https://dev.domain.tld', 'xxx')
>>> p = gl.projects.get(30)
>>> i = p.issues.get(9364)
>>> i.save()
>>> i.milestone = 1812
>>> i.save()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gitlab/mixins.py", line 312, in save
server_data = self.manager.update(obj_id, updated_data, **kwargs)
File "/usr/lib/python2.7/dist-packages/gitlab/exceptions.py", line 253, in wrapped_f
raise error(e.error_message, e.response_code, e.response_body)
gitlab.exceptions.GitlabUpdateError: 400: {"error":"title, description, assignee_ids, assignee_id, milestone_id, discussion_locked, labels, created_at, due_date, confidential, state_event are missing, at least one parameter must be provided"}
1812 is the milestone iid.
I also tried with:
>>> m = p.milestones.get(1812)
>>> m
<ProjectMilestone id:1812>
>>> i.milestone = m
>>> i.save()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/gitlab/mixins.py", line 312, in save
server_data = self.manager.update(obj_id, updated_data, **kwargs)
File "/usr/lib/python2.7/dist-packages/gitlab/exceptions.py", line 251, in wrapped_f
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/gitlab/mixins.py", line 227, in update
return self.gitlab.http_put(path, post_data=data, **kwargs)
File "/usr/lib/python2.7/dist-packages/gitlab/__init__.py", line 827, in http_put
post_data=post_data, **kwargs)
File "/usr/lib/python2.7/dist-packages/gitlab/__init__.py", line 685, in http_request
prepped = self.session.prepare_request(req)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 407, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 305, in prepare
self.prepare_body(data, files, json)
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 445, in prepare_body
body = complexjson.dumps(json)
File "/usr/lib/python2.7/json/__init__.py", line 244, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python2.7/json/encoder.py", line 184, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <ProjectMilestone id:1812> is not JSON serializable
python-gitlab version: 1.3.0
API version you are using (v3/v4): V4
Gitlab server version (or gitlab.com): 11.3.4
The text was updated successfully, but these errors were encountered:
I'm not able to set the milestone to an issue:
1812 is the milestone iid.
I also tried with:
The text was updated successfully, but these errors were encountered: