Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3544 by ericsnowcurrently: TypeError in reviewboard.admin.support
https://code.google.com/p/reviewboard/issues/detail?id=3544

*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.


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:

--noinput
--domain-name=<ip-address>
--db-type=postgresql
--db-name=reviewboard
--db-host=<db-ip-address>:5432
--db-user=<db-user>
--db-pass=<db-pass>
--cache-type=memcached
--web-server-type=apache
--web-server-port=80
--python-loader=wsgi
--admin-user=admin
--admin-password=""
/var/www/reviewboard

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

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

expected: no error
actual:

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
    command.run()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1226, in run
    self.show_install_status()
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
    self.setup_support)
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1069, in step
    func()
File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.6-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1634, in setup_support
    site.register_support_page()
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.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to