#1282 python3 webui shows error instead of buildinfo
Closed: Fixed by mikem. Opened by mfilip.

Following error is shown in webui in buildinfo section

An error has occurred while processing your request.
xmlrpc.client.Fault: <Fault 1: "<class 'TypeError'>: dictionary key must be string">
Full tracebacks disabled

Is it happening with py2 or py3 hub (or both)?

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.17

It really helps if bug reports provide more complete information about the observed problem. Just pasting an error without context gives us little to go on.

Which page in the web ui returned the error? I'm guessing /buildinfo from the title, but that could be clearer. What type of build did you click on? (different types of builds display differently had hit different code paths).

Lastly a full traceback would be much more helpful. Those can be found in the httpd error logs on the web and/or hub system in question.

+1 for Mikem's comments, @jcupova @mfilip we need a bug report format in case some required information is lost.

PR #1293

Side note: test instances should probably run with PythonDebug = on in web.conf.

The full traceback in the web ui is:

Traceback (most recent call last):
  File "/usr/share/koji-web/scripts/wsgi_publisher.py", line 378, in handle_request
    result = func(environ, **data)
  File "/usr/share/koji-web/scripts/index.py", line 1145, in buildinfo
    headers = server.getRPMHeaders(srpm['id'], headers=['summary', 'description'])
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2055, in __call__
    return self.__func(self.__name, args, opts)
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2546, in _callMethod
    raise err
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2527, in _callMethod
    return self._sendCall(handler, headers, request)
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2449, in _sendCall
    return self._sendOneCall(handler, headers, request)
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2491, in _sendOneCall
    ret = self._read_xmlrpc_response(r)
  File "/usr/lib/python3.6/site-packages/koji/__init__.py", line 2503, in _read_xmlrpc_response
    result = u.close()
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 656, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 1: "<class 'TypeError'>: dictionary key must be string">

Since this is a Fault, it originated on the hub. That traceback is:

Traceback (most recent call last):
  File "/usr/share/koji-hub/kojixmlrpc.py", line 238, in _wrap_handler
    response = dumps(response, methodresponse=1, marshaller=Marshaller)
  File "/usr/lib/python3.6/site-packages/koji/xmlrpcplus.py", line 90, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 502, in dumps
    dump(v, write)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 524, in __dump
    f(self, value, write)
  File "/usr/lib64/python3.6/xmlrpc/client.py", line 593, in dump_struct
    raise TypeError("dictionary key must be string")
TypeError: dictionary key must be string

This can be replicated directly by calling the api directly.

koji -p lkoji call getRPMHeaders 6019 --kwargs '{"headers": ["summary", "description"]}'

Or by using the fakehub script in devtools:

python3 ./devtools/fakehub getRPMHeaders 6019 headers='["summary", "description"]'

Commit 2250daba fixes this issue

Commit a209f174 fixes this issue

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/1282

Please continue any further discussion there.

Metadata
Related Pull Requests