Bug 486085

Summary: 'xmlrpclib.Fault: <Fault -1: ...' when creating new errata
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: APIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED NOTABUG QA Contact: Brandon Perkins <bperkins>
Severity: medium Docs Contact:
Priority: low    
Version: 520   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-18 16:24:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Hutař 2009-02-18 10:14:46 UTC
Description of problem:
When I try to create a new errata, I'm getting traceback.


Version-Release number of selected component (if applicable):
Red Hat Network release 5.2.0


How reproducible:
always


Steps to Reproduce:
1. >>> client.errata.create(key, me, mb, mk, mp, True, 'test-0')


Actual results:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'com.redhat.rhn.common.translation.TranslationException: Could not find translator for class java.lang.String to interface java.util.List'>


Expected results:
Errata created


Additional info:
>>> print me
{'advisory_name': 'advisory_name', 'advisory_type': 'Bug Fix Advisory', 'product': 'product', 'description': 'description', 'notes': 'notes', 'solution': 'solution', 'topic': 'topic', 'synopsis': 'synopsis', 'references': 'references', 'advisory_release': 1}
>>> print mb
({'id': 123456, 'summary': 'bug 123456 summary'},)
>>> print mk
('keyword1', 'keyword2')
>>> print mp
(198,)
>>> a = client.errata.create(key, me, mb, mk, mp, True, 'test-0')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'com.redhat.rhn.common.translation.TranslationException: Could not find translator for class java.lang.String to interface java.util.List'>

I do not know what I'm doing wrong here.

Comment 1 Brad Buckingham 2009-02-18 15:55:31 UTC
Hi Jan,

The error appears to be related to the channel label being specified as a string ('test-0') vs an array (['test-0']).

Try the test using the same variables (me, mb, mk, mp); however, use the following:
 a = client.errata.create(key, me, mb, mk, mp, True, ['test-0'])


I tried this in my env (5.3) and it works Ok.

Comment 2 Jan Hutař 2009-02-18 16:24:28 UTC
Oh, you are right, thank you and sorry for the mess!

Thanks,
Jan