387: Error "Control Characters not allowed"

gau****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
March 21, 2011
1183
What's the URL of the page containing the problem?
http://reviewboard.eng.vmware.com/r/10505/diff/#index_header

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
    enable_syntax_highlighting)
  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>
    enable_syntax_highlighting))
  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
get_original_file
    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):
  File
"/usr/lib/python2.5/site-packages/django/core/cache/backends/base.py", line
64, in has_key
    return self.get(key) is not None
  File
"/usr/lib/python2.5/site-packages/django/core/cache/backends/memcached.py",
line 23, in get
    val = self._cache.get(smart_str(key))
  File "/usr/lib/python2.5/site-packages/memcache.py", line 342, in get
    check_key(key)
  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 2.0.0.11

Please provide any additional information below.
chipx86
#1 chipx86
Fixed in r1155 and updated on the VMware server.
  • +Fixed
  • -Priority-Medium
    +Priority-High
    +Milestone-Release1.0
    +Component-DiffParser
  • +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),
                            urlquote(revision))

to get it to work. revision seemed to contain some strange char. I'm using bzr as SCM
chipx86
#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.
chipx86
#6 chipx86
Can you please submit a patch to http://reviews.reviewboard.org/?
  • -Fixed
    +Started
david
#8 david
Fixed in release-1.5.x as 171d857. This will ship in 1.5.5. Thanks!
  • -Started
    +Fixed