Discussion:
[Bug 1663601] [NEW] "grep-merges" fails with "TypeError: sequence item 0: expected string, NoneType found"
Robie Basak
2017-02-10 13:28:11 UTC
Permalink
Public bug reported:

$ grep-merges Basak
Traceback (most recent call last):
File "/usr/bin/grep-merges", line 74, in <module>
main()
File "/usr/bin/grep-merges", line 68, in main
pretty_uploader = ' '.join((author, uploader)).strip()
TypeError: sequence item 0: expected string, NoneType found

I've been told other people are hitting this, too. At least Xenial
(0.155ubuntu2) and Zesty (0.157) are affected. Patch:

--- /usr/bin/grep-merges 2016-07-07 20:12:04.000000000 +0100
+++ /tmp/grep-merges 2017-02-07 00:23:22.802977775 +0000
@@ -61,9 +61,9 @@
for merge in json.loads(page):
package = merge['source_package']
author, uploader = '', ''
- if 'user' in merge:
+ if merge.get('user'):
author = merge['user']
- if 'uploader' in merge:
+ if merge.get('uploader'):
uploader = '(%s)' % merge['uploader']
pretty_uploader = ' '.join((author, uploader)).strip()
if (match is None or

** Affects: ubuntu-dev-tools (Ubuntu)
Importance: Medium
Status: Triaged


** Tags: patch
--
You received this bug notification because you are a member of MOTU,
which is subscribed to ubuntu-dev-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1663601

Title:
"grep-merges" fails with "TypeError: sequence item 0: expected string,
NoneType found"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1663601/+subscriptions
--
universe-bugs mailing list
universe-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/universe-bugs
Dmitry Shachnev
2017-02-16 09:58:43 UTC
Permalink
** Branch linked: lp:~mitya57/ubuntu-dev-tools/grep-merges-fix
--
You received this bug notification because you are a member of MOTU,
which is subscribed to ubuntu-dev-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1663601

Title:
"grep-merges" fails with "TypeError: sequence item 0: expected string,
NoneType found"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1663601/+subscriptions
--
universe-bugs mailing list
universe-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/universe-bugs
Launchpad Bug Tracker
2017-03-30 03:59:22 UTC
Permalink
This bug was fixed in the package ubuntu-dev-tools - 0.158

---------------
ubuntu-dev-tools (0.158) experimental; urgency=medium

* Team upload.

[ Dmitry Shachnev ]
* grep-merges: Do not override author or uploader with None.
There can be JSON entries which have uploader=None. (LP: #1663601)

[ Colin Watson ]
* pbuilder-dist, ubuntu-build: Add s390x.

[ James Page ]
* grep-merges: Use unicode string format for pretty output to deal with
non ascii encoding.

[ Corey Bryant ]
* pull-uca-source: Added to pull source from Ubuntu Cloud Archive.

-- Mattia Rizzolo <***@debian.org> Wed, 29 Mar 2017 20:07:38 +0200

** Changed in: ubuntu-dev-tools (Ubuntu)
Status: Triaged => Fix Released
--
You received this bug notification because you are a member of MOTU,
which is subscribed to ubuntu-dev-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1663601

Title:
"grep-merges" fails with "TypeError: sequence item 0: expected string,
NoneType found"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools/+bug/1663601/+subscriptions
--
universe-bugs mailing list
universe-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/universe-bugs
Loading...