4627: Diff fragments do not load.


What version are you running?


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


What steps will reproduce the problem?

  1. Open a review diff page

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

None of the diff fragments load.

What operating system are you using? What browser?

The server's operating system is Python 2.7.5 shipped by Red Hat on RHEL 7. (Browser is Chrome on Windows)

Please provide any additional information below.

The Python exception is "TypeError: Struct() argument 1 must be string, not unicode".

I was able to fix the issue on my instance by patching all of reviews/views.py calls to struct.pack (lines 975, 977 and 1430) by using byte literals in the first argument instead of string literals (which are implied to be unicode).

#1 chipx86

Turns out this is a Python compatibility issue. As of Python 2.7.7, Unicode strings are allowed. We'll get a patch out for the next release, but for now I'd go with your patch. I'll post our version of it here.

#2 chipx86

Fix up for review: https://reviews.reviewboard.org/r/9476/

  • -New
  • +Release-3.0.x
  • -Priority:Medium
  • +chipx86
#3 chipx86

Fix pushed to release-3.0.x (e6d11ca70537c820081ce0afe58268cd781fa452).

  • -PendingReview