python-jenkins-developers team mailing list archive
-
python-jenkins-developers team
-
Mailing list archive
-
Message #00649
[Bug 1781381] Re: Cannot delete build using delete_build
Hi Glidas,
I was using the python-jenkins wrapper, and i still cant use the
delete_build() command as it shows the error: byte cant be assigned any
item. How to solve this problem? i dont want to change anything in the
__init__.py as the project i am working on will be distributed globally and
its not physically possible to change the __init__.py file of jenkins in
each of the server.
Since this is almost an year old issue, did the developer made the
correction?
please let me know.
Thanks and regards.
Kartik Tanwar
--
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1781381
Title:
Cannot delete build using delete_build
Status in Python Jenkins:
New
Bug description:
Requirement already up-to-date: python-jenkins in
.XXXXXXX/venv/lib/python3.6/site-packages (1.0.2)
In line 357 of __init__.py (function maybe_add_crumb) the code fails on req.headers[self.crumb['crumbRequestField']] = self.crumb['crumb']
at this point i have a value for self.crumb and req.headers is b''
the error i get is "bytes' object does not support item assignment"
trace
File "XXXXXX.py", line 9, in <module>
j.delete_build(r"Whale Watchers/Project Whale Watcher QA - Grouped", k)
File "XXXXXX/venv/lib/python3.6/site-packages/jenkins/__init__.py", line 1354, in delete_build
self._build_url(DELETE_BUILD, locals()), b''))
File "XXXXXX/venv/lib/python3.6/site-packages/jenkins/__init__.py", line 540, in jenkins_open
return self.jenkins_request(req, add_crumb, resolve_auth).text
File "XXXXXX/venv/lib/python3.6/site-packages/jenkins/__init__.py", line 556, in jenkins_request
self.maybe_add_crumb(req)
File "XXXXXX/venv/lib/python3.6/site-packages/jenkins/__init__.py", line 357, in maybe_add_crumb
req.headers[self.crumb['crumbRequestField']] = self.crumb['crumb']
TypeError: 'bytes' object does not support item assignment
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/1781381/+subscriptions
References