1713: postreview.py fails with API Error 105

daniel*******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Nov. 6, 2010
We use the pre-commit-hook from this review: http://reviews.reviewboard.org/r/822/
It uses the api-classes in reviewboard.py from RBTools 0.2 to make the calls to the server and create a new review-request.
Since upgrading from 1.5beta2 to 1.5rc1 the commit-hook does not work anymore because of the following error:
>>> HTTP POSTing to http://reviewboard.xxx.com/api/json/reviewrequests/44/diff/new/: {'basedir': '/'}
>>> Got API Error 105 (HTTP code 200): One or more fields had errors
>>> Error data: {'fields': {'path': ['table diffviewer_filediff has no column named status']}, 'stat': 'fail', 'err': {'msg': 'One or more fields had errors', 'code': 105}, 'deprecated': {'in_version': '1.5'}}

Is this a regression introduced in ReviewBoard 1.5rc1, or is it that reviewboard.py or the pre-commit-hook is outdated and needs fixing?

What version are you running?
ReviewBoard 1.5RC1.

What's the URL of the page containing the problem?
Probably api/json/reviewrequests/44/diff/new/

What steps will reproduce the problem?
1. Try to create a new review-request through the commit-handler (which uses postreview.py)
chipx86
#1 chipx86
Neither. It looks like you didn't run 'rb-site upgrade' on your site, so there are fields missing from your database.
#2 lihu*****@gmai***** (Google Code) (Is this you? Claim this profile.)
when i run `rb-site upgrade`, it tells me"No evolution required."
So what causes the "Got API Error 105 (HTTP code 200): One or more fields had errors"
chipx86
#3 chipx86
You can get the API Error 105 for many reasons, but if it specifically says "table diffviewer_filediff has no column named status" then the evolution still needs to be applied. Of course, the question is, why didn't rb-site see that an evolution was missing.

Can you look at the second line of your rb-site script? (I assume /usr/bin/rb-site). See what version it's referring to. It's possible, I suppose, that rb-site is running as the old version and therefore not seeing the new evolution files. Was the upgrade done using easy_install?
  • +NeedInfo
  • +chipx86
david
#4 david
  • -NeedInfo
    +Incomplete