Description of problem: An attempt to print a string representation of a CoprResponse instance causes a traceback. Version-Release number of selected component (if applicable): python-copr-1.58-1.fc21.noarch How reproducible: always Steps to Reproduce: 1. from copr.client import CoprClient 2. cl = CoprClient.create_from_file_config() 3. prj = cl.get_project_details('dnf') 4. unicode(prj) Actual results: Traceback (most recent call last): File "/tmp/stack/dnfstackci.py", line 974, in <module> _start_commandline() File "/tmp/stack/dnfstackci.py", line 784, in _start_commandline unicode(prj) TypeError: coercing to Unicode: need string or buffer, dict found Expected results: Successful conversion of the instance to a Unicode string. Additional info: Originally, I discovered when trying to "print(prj)" which causes: Traceback (most recent call last): File "/tmp/stack/dnfstackci.py", line 974, in <module> _start_commandline() File "/tmp/stack/dnfstackci.py", line 784, in _start_commandline print(str(prj)) File "/usr/lib/python2.7/site-packages/copr/client/util.py", line 15, in __str__ return self.__unicode__().encode('utf8') AttributeError: 'dict' object has no attribute 'encode' The problem is probably here: https://git.fedorahosted.org/cgit/copr.git/tree/python/copr/client/responses.py#n65 I guess the return value should be converted to a string.
(I miss a python-copr component there)
Radek, thank you for the feedback. Modified in: 59288d7
Version with this fix has been just deployed to production.