3544: TypeError in reviewboard.admin.support

ericsnow*********@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 26, 2014
What version are you running?

ReviewBoard 2.0.6
Djblets 0.8.9

What's the URL of the page containing the problem?

No URL. Error when running rb-site install.

What steps will reproduce the problem?
1. run rb-site install with the following options:


Note that I'm not passing --admin-email nor --company.

What is the expected output? What do you see instead?

expected: no error

Setting up support ... Traceback (most recent call last):
  File "/usr/local/bin/rb-site", line 9, in <module> 
    load_entry_point('ReviewBoard==2.0.6', 'console_scripts', 'rb-site')()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1858, in main
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1226, in run
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1547, in show_install_status
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1069, in step
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1634, in setup_support
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 596, in register_support_page
    url = get_register_support_url(force_is_admin=True)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/admin/support.py", line 61, in get_register_support_url
    support_data = serialize_support_data(request, force_is_admin)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/admin/support.py", line 38, in serialize_support_data
    '%s.%s.%s' % sys.version_info[:3],
TypeError: sequence item 4: expected string or Unicode, NoneType found

What operating system are you using? What browser?

Ubuntu 14.04

Please provide any additional information below.

The issue is that in reviewboard.admin.support:serialize_support_data(), siteconfig.get() returns None when the key is not found (so perhaps something changed in Djblets?).  Thus there end up being None values in the list passed to str.join(), which results in the TypeError.

Passing a "" default (or using the ' or ""' idiom) would resolve the issue.  As well, the error may indicate a failure case that happens only with a certain combination of options to rb-site install where defaults do not get set properly on siteconfig.

While it looks like later versions of ReviewBoard do not have the problematic serialize_support_data(), they do have get_support_url(), which presumably suffers from the same problem.  Furthermore, this failure happens with 2.0.6, which is the version that apt-get installs on Ubuntu 14.04.  So I expect it would be worth addressing in the older version as well.

In the meantime I plan on working around the problem by passing empty strings for the --admin-email and --company options.
#1 chipx86
2.0.6 is the latest stable release. I'll make sure we fix this for 2.0.7.
  • +Confirmed
  • -Priority-Medium
#2 chipx86
  • -Confirmed
  • +chipx86
#3 chipx86
Thanks for the report! Fixed on release-2.0.x (41fc515).

This will ship with 2.0.7.
  • -PendingReview
#4 ericsnow*********@gmai***** (Google Code) (Is this you? Claim this profile.)
Awesome.  Thanks for the quick response.