[python-bugzilla] bugzilla 4.4.4
Cole Robinson
crobinso at redhat.com
Sun Jun 15 16:27:13 UTC 2014
On 06/06/2014 05:24 AM, JiekeWu wrote:
>
> hello, everyone,
>
> I have a system to create bug automatically, using python-bugzilla 0.7 and bugzilla 4.2.5 on Centos 6.
> recently, I upgrade bugzilla to 4.4.4, and find /usr/bin/bugziila 0.7 is not working.
> error like that:
>
> Fault: <Fault 32000: u"A value must be set for the '\u7c7b\u578b' field.">
>
This seems to indicate that the upgrade added a custom mandatory bug field for
new bugs. If this is intentional, you would need to extend the dictionary
created by bz.build_createbug with a value for that mandatory field. However
that's definitely not default bugzilla behavior, so perhaps your bugzilla
instance is misconfigured.
>
> So I upgrade python-bugzilla to latest one, git commit:
>
> commit e3f17d7db5907ea629f31fbc892576fdf9ccec4e
> Author: Josef Stribny <jstribny at redhat.com>
> Date: Tue Jun 3 15:27:08 2014 +0200
>
>
> error is changed as:
>
> Traceback (most recent call last):
> File "/usr/bin/bugzilla", line 1250, in <module>
> main()
> File "/usr/bin/bugzilla", line 1222, in main
> buglist = _do_new(bz, opt)
> File "/usr/bin/bugzilla", line 900, in _do_new
> b = bz.createbug(ret)
> File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 1613, in createbug
> rawbug = self._proxy.Bug.create(data)
> File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 165, in _ServerProxy__request
> ret = ServerProxy._ServerProxy__request(self, methodname, params)
> File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
> verbose=self.__verbose
> File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 260, in request
> return self._request_helper(url, request_body)
> File "/usr/lib/python2.6/site-packages/bugzilla/base.py", line 247, in _request_helper
> raise e
> BugzillaError: 'ascii' codec can't encode characters in position 149-153: ordinal not in range(128)
>
> Server error: 'ascii' codec can't encode characters in position 149-153: ordinal not in range(128)
>
>
> any suggestions? and do you have a plan to support 4.4.4?.
>
>
I'm interested in what's happening here. Can you apply this patch to current
git, retry, and post the output here?
diff --git a/bugzilla/base.py b/bugzilla/base.py
index d9b4e28..aa49eb3 100644
--- a/bugzilla/base.py
+++ b/bugzilla/base.py
@@ -233,14 +233,17 @@ class RequestsTransport(Transport):
response.raise_for_status()
return self.parse_response(response)
except requests.RequestException:
+ raise
e = sys.exc_info()[1]
if not response:
raise
raise ProtocolError(
url, response.status_code, str(e), response.headers)
except Fault:
+ raise
raise sys.exc_info()[1]
except Exception:
+ raise
# pylint: disable=W0201
e = BugzillaError(str(sys.exc_info()[1]))
e.__traceback__ = sys.exc_info()[2]
More information about the python-bugzilla
mailing list