Bug 1327607
| Summary: | [PY3] when sending builds TypeError: <map object at 0x7f5a54772898> is not JSON serializable | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Igor Gnatenko <ignatenko> |
| Component: | python-copr | Assignee: | Jakub Kadlčík <jkadlcik> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | imvalgo, jkadlcik, msuchy |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-copr-1.68-1.fc22 python-copr-1.68-1.fc23 python-copr-1.68-1.fc24 python-copr-1.68-1.el7 python-copr-1.68-1.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-16 22:24:59 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Reproducer: COPR_URL = "http://copr-fe-dev.cloud.fedoraproject.org/" from copr import create_client2_from_params cl = create_client2_from_params(root_url=COPR_URL) cl.builds.create_from_url(project_id=123, srpm_url="https://foo.bar/baz.src.rpm") (In reply to Jakub Kadlčík from comment #2) > Reproducer: > > COPR_URL = "http://copr-fe-dev.cloud.fedoraproject.org/" > from copr import create_client2_from_params > cl = create_client2_from_params(root_url=COPR_URL) > cl.builds.create_from_url(project_id=123, > srpm_url="https://foo.bar/baz.src.rpm") yup. it's easy bug and easy fix and patch already sent ;) > and patch already sent ;)
I know, I just wanted to try it before merge, so I also posted the reproducer here.
Thank you for the patch, Igor
Oops, I forgot: Modified in: a778a99 Merge: 2f9313d python-copr-1.68-1.fc22 copr-cli-1.50-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-83199bf70e python-copr-1.68-1.el7 copr-cli-1.50-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-9a4d5dfb13 python-copr-1.68-1.fc24 copr-cli-1.50-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e2be6d1814 python-copr-1.68-1.fc23 copr-cli-1.50-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-99f84a68dc python-copr-1.68-1.el6 copr-cli-1.50-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d7889ce228 copr-cli-1.50-1.fc24, python-copr-1.68-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e2be6d1814 copr-cli-1.50-1.fc23, python-copr-1.68-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-99f84a68dc copr-cli-1.50-1.el6, python-copr-1.68-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d7889ce228 copr-cli-1.50-1.el7, python-copr-1.68-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-9a4d5dfb13 copr-cli-1.50-1.fc22, python-copr-1.68-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-83199bf70e copr-cli-1.50-1.fc22, python-copr-1.68-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report. copr-cli-1.50-1.fc23, python-copr-1.68-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. copr-cli-1.50-1.fc24, python-copr-1.68-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. copr-cli-1.50-1.el7, python-copr-1.68-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. copr-cli-1.50-1.el6, python-copr-1.68-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. |
Traceback (most recent call last): File "run.py", line 78, in <module> main() File "run.py", line 73, in main _build_in_copr(args.srpm, args.project_owner, args.project_name) File "run.py", line 22, in _build_in_copr build = project.create_build_from_file(srpm, enable_net=False) File "/usr/lib/python3.5/site-packages/copr/client_v2/resources.py", line 300, in create_build_from_file return builds.create_from_file(self.id, *args, **kwargs) File "/usr/lib/python3.5/site-packages/copr/client_v2/handlers.py", line 179, in create_from_file obj=json.dumps(content), content_type="application/json") File "/usr/lib64/python3.5/json/__init__.py", line 230, in dumps return _default_encoder.encode(obj) File "/usr/lib64/python3.5/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib64/python3.5/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/usr/lib64/python3.5/json/encoder.py", line 180, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: <map object at 0x7f5a54772898> is not JSON serializable