500 error when viewing repository group with Stylify metatags enabled

Issue #897 resolved
Lee Loucks created an issue

Rhodecode version: 1.7.1

If you enable Stylify metatags in the Settings administration page and have a repository group without a description you receive a HTTP 500 when attempting to view that repository group's dashboard.

Error - <type 'exceptions.TypeError'>: expected string or buffer
URL: http://rc.local/
...snip stack trace...
File '.../venv/rc171/data/templates/index_base.html.py', line 118 in render_body
File '.../venv/rc171/lib/python2.6/site-packages/rhodecode/lib/helpers.y', line 519 in desc_stylize
 '<div class="metatag" tag="see">see =&gt; \\1 </div>', value)
File '/var/venv/rc171/lib64/python2.6/re.py', line 151 in sub
 return _compile(pattern, 0).sub(repl, string, count)
TypeError: expected string or buffer


  1. Install RC 1.5.4
  2. Create repository group without a description
  3. View dashboard or repository groups parent group (it works)
  4. Upgrade to RC 1.7.1
  5. Enable Stylify metadata tags
  6. View dashboard or repository groups parent group (HTTP 500)


  • Adding a print type(value) at
    line # 515 of helpers.py shows that the value variable is <type 'NoneType'> for this repository which is what is blowing up the regex.
  • Editing the repository group and clicking save (w/o making changes) will update the Description field to a value that is acceptable by the regex in helpers.py.

Comments (4)

  1. Lee Loucks reporter

    I would have set the version for this issue to 1.7.1 but the highest version offered was 1.6...

  2. Log in to comment