387: Error "Control Characters not allowed"

gau****@gmai***** (Google Code) (Is this you? Claim this profile.)
March 21, 2011
What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. Its probably just tied to my particular diff

What is the expected output? 
A nice colorful diff.

What do you see instead?

Control characters not allowed

Traceback (most recent call last):
  File "/root/reviewboard/diffviewer/views.py", line 81, in view_diff
    files = get_diff_files(diffset, None, interdiffset, highlighting)
  File "/root/reviewboard/diffviewer/diffutils.py", line 538, in get_diff_files
  File "/root/reviewboard/diffviewer/diffutils.py", line 477, in generate_files
    lambda: get_chunks(filediff.diffset,
  File "/root/reviewboard/djblets/util/misc.py", line 44, in cache_memoize
    data = lookup_callable()
  File "/root/reviewboard/diffviewer/diffutils.py", line 480, in <lambda>
  File "/root/reviewboard/diffviewer/diffutils.py", line 275, in get_chunks
    old = get_original_file(filediff)
  File "/root/reviewboard/diffviewer/diffutils.py", line 186, in
    return cache_memoize(key, lambda: [tool.get_file(file, revision)])[0]
  File "/root/reviewboard/djblets/util/misc.py", line 42, in cache_memoize
    if cache.has_key(key):
"/usr/lib/python2.5/site-packages/django/core/cache/backends/base.py", line
64, in has_key
    return self.get(key) is not None
line 23, in get
    val = self._cache.get(smart_str(key))
  File "/usr/lib/python2.5/site-packages/memcache.py", line 342, in get
  File "/usr/lib/python2.5/site-packages/memcache.py", line 580, in check_key
    raise Client.MemcachedKeyCharacterError, "Control characters not allowed"
MemcachedKeyCharacterError: Control characters not allowed

What operating system are you using? What browser?
Windows 2003, firefox

Please provide any additional information below.
#1 chipx86
Fixed in r1155 and updated on the VMware server.
  • +Fixed
  • -Priority-Medium
  • +chipx86
#2 sna****@gmai***** (Google Code) (Is this you? Claim this profile.)
I tried 1.5RC1 and this bug still exists, I had to add 

 key = "%s:%s:%s" % (urlquote(filediff.diffset.repository.path), urlquote(file),

to get it to work. revision seemed to contain some strange char. I'm using bzr as SCM
#3 chipx86
Where was this change made exactly?
#4 benoit.d********@gmai***** (Google Code) (Is this you? Claim this profile.)
The changes were made to the file diffviewer/diffutils.py (around line 364) under PYTHON_DIR/Lib/site-packages/ReviewBoard-<version>/reviewboard.
#5 sped****@gmai***** (Google Code) (Is this you? Claim this profile.)
Using 1.5 and I too had to change diffutils.py. After that I didn't get the error anymore.
#6 chipx86
Can you please submit a patch to http://reviews.reviewboard.org/?
  • -Fixed
#8 david
Fixed in release-1.5.x as 171d857. This will ship in 1.5.5. Thanks!
  • -Started