Description of problem: Fetching a user whose name contains Unicode characters results in a traceback. This worked fine with Nitrate 3.4. Version-Release number of selected component (if applicable): Nitrate 3.5.0 Steps to Reproduce: User.get(2117) Actual results: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "nitrate.py", line 120, in request_with_cookies return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response return u.close() File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault 1: "UnicodeEncodeError: 'ascii' codec can't encode character u'\\u0160' in position 0: ordinal not in range(128)">
Seems the problem is not limited to the User object. Today I've come across the following traceback while trying to fetch test case data: TestCase.get(12345) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "nitrate.py", line 120, in request_with_cookies return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response return u.close() File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault 1: "UnicodeEncodeError: 'ascii' codec can't encode character u'\\u2013' in position 378: ordinal not in range(128)">
Seems works ok for me: In [1]: from nitrate import NitrateKerbXmlrpc In [2]: n = NitrateKerbXmlrpc('https://tcms-stage.englab.bne.redhat.com/xmlrpc/') In [3]: n.server.User.get(2117) Out[3]: {'date_joined': '2009-12-02 09:40:59', 'email': 'psplicha', 'first_name': 'Petr', 'id': '2117', 'is_active': 'True', 'is_staff': 'True', 'is_superuser': 'False', 'last_login': '2011-07-26 17:40:51', 'last_name': 'Splichal', 'username': 'psplicha'} In [4]: n = NitrateKerbXmlrpc('https://tcms.engineering.redhat.com/xmlrpc/') In [5]: n.server.User.get(2117) Out[5]: {'date_joined': '2009-12-02 09:40:59', 'email': 'psplicha', 'first_name': 'Petr', 'id': '2117', 'is_active': 'True', 'is_staff': 'True', 'is_superuser': 'False', 'last_login': '2011-07-27 19:37:14', 'last_name': 'Splichal', 'username': 'psplicha'} (In reply to comment #0) > Description of problem: > > Fetching a user whose name contains Unicode characters results in > a traceback. This worked fine with Nitrate 3.4. > > Version-Release number of selected component (if applicable): > Nitrate 3.5.0 > > Steps to Reproduce: > User.get(2117) > > Actual results: > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ > return self.__send(self.__name, args) > File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request > verbose=self.__verbose > File "nitrate.py", line 120, in request_with_cookies > return self._parse_response(h.getfile(), sock) > File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response > return u.close() > File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close > raise Fault(**self._stack[0]) > xmlrpclib.Fault: <Fault 1: "UnicodeEncodeError: 'ascii' codec can't encode > character u'\\u0160' in position 0: ordinal not in range(128)">
I'll see what's wrong in the backends. Thanks for reporting. (In reply to comment #1) > Seems the problem is not limited to the User object. Today I've > come across the following traceback while trying to fetch test > case data:
(In reply to comment #2) > Seems works ok for me: > > {'date_joined': '2009-12-02 09:40:59', > 'email': 'psplicha', > 'first_name': 'Petr', > 'id': '2117', > 'is_active': 'True', > 'is_staff': 'True', > 'is_superuser': 'False', > 'last_login': '2011-07-26 17:40:51', > 'last_name': 'Splichal', > 'username': 'psplicha'} I've changed my surname to ASCII only to be able to run my scripts. Just use "Šplíchal" as the surname for an example.
Any update about fixing this unpleasant regression?
@Petr, Sorry, was busy with other stuffs recently. I'll take it. There're some unexpected behaviors in rpc functions in 3.5. (In reply to comment #5) > Any update about fixing this unpleasant regression?
Hi, I've found same bug with UTF formating: TP#1815 - system-config-printer / General: <Fault 1: "UnicodeEncodeError: 'ascii' codec can't encode character u'\\u201c' in position 6: ordinal not in range(128)"> I've found also another bug, in same function, >>> TP#4333 - cups / General: <Fault 1: 'DoesNotExist: User matching query does not exist.'> I don't know what case this problem, but I know that it is caused by testplan 4333 so it is reproducible very easy. Thanks&Regards Honza
Please fix this, it is hampering our ability to process test-tier runs (=critical process) as fast as needed.
Hi, This bug to be fixed in 3.6 version.
This is a critical regression for us. What is the ETA of 3.6 please? I expected this issue to be fixed in 3.5 already.
Code frozen in two weeks. Depends on the acceptance testing result, 3.6 would be online after that. Sorry for inconvenience.
another problem found, propably connect with UTF: cases = self.tcms.TestRun.get_test_cases(self.id) XML-RPC returns: XML-RPC fault: DoesNotExist: User matching query does not exist. when used https://tcms.engineering.redhat.com/run/26826/ It blocks my testing. Regards Honza
created bug for more verbose tracebacks in XML-RPC interface: https://bugzilla.redhat.com/show_bug.cgi?id=737986
The 3.6 hotfix release should now be alive on production with this issue fixed.
Issue mentioned in comment #0 seems to be fixed. However fetching TC#12345 still fails: >>> TestCase.get(12345) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "nitrate.py", line 120, in request_with_cookies return self._parse_response(h.getfile(), sock) File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response return u.close() File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault 1: 'DoesNotExist: User matching query does not exist.'>
In this thread we are having two different problems, let's create a new bug regarding to humanizing traceback information, and close this one.
I believe the "better tracebacks" issue should be already covered by bug 737986. Anyway, what's actual problem here? Why, when trying to fetch a test case data I get an error message regarding non-existent user?
Another month passed without any feedback. Can we get status and ETA on this urgent regression?
This goes fixed in the coming version, thus to be alive in three weeks to come.
Verify version and result: 3.6.2 on englab --> PASSED Actual results: >>> from nitrate import NitrateKerbXmlrpc >>> n=NitrateKerbXmlrpc('https://tcms.englab.nay.redhat.com/xmlrpc/') >>> n.server.User.get(2117) {'username': 'psplicha', 'first_name': 'Petr', 'last_name': 'Splichal', 'is_active': True, 'id': 2117, 'is_superuser': False, 'is_staff': True, 'last_login': '2011-09-29 15:47:24', 'groups': [1, 3], 'user_permissions': [], 'email': 'psplicha', 'date_joined': '2009-12-02 09:40:59'}