API Error 224 - The specified diff file could not be parsed.

1,148 views
Skip to first unread message

Yoni Gittelman

unread,
Feb 14, 2016, 1:39:39 PM2/14/16
to reviewboard
Hi,
When I try to generate a code review for a certain branch I get this error, for other branches I don't. 

>>> RBTools 0.7.5
>>> Python 2.7.11 (default, Jan 22 2016, 08:29:18)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
>>> Running on Darwin-15.3.0-x86_64-i386-64bit
>>> Home = /Users/SA
>>> Current directory = /Users/SA/src/sapi
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info /var/www/html/rb01/data/repositories/sapi/.git
>>> Command exited with rc 1: ['svn', '--non-interactive', u'info', '/var/www/html/rb01/data/repositories/sapi/.git']
svn
: E155007: '/var/www/html/rb01/data/repositories/sapi/.git' is not a working copy
---
>>> Checking for a Git repository...
>>> Running: git rev-parse --git-dir
>>> Running: git config core.bare
>>> Running: git rev-parse --show-toplevel
>>> Running: git symbolic-ref -q HEAD
>>> Running: git config --get ***.merge
>>> Running: git config --get ***.remote
>>> Running: git config --get remote.origin.url
>>> repository info: Path: /var/www/html/rb01/data/repositories/sapi/.git, Base path: , Supports changesets: False
>>> Making HTTP GET request to ***
>>> Running: git rev-parse refs/heads/****
>>> Running: git merge-base 525bf401c19ea8da6872fe3c39cadd56084dae07 origin/master
>>> Running: git rev-parse 156168eb97cd9d4bc0eff74d70e68438e81aa8c9
>>> Running: git status --porcelain --untracked-files=no
>>> Running: git rev-parse --git-dir
>>> Running: git version
>>> Running: git -c core.quotepath=false -c diff.noprefix=false diff --no-color --full-index --ignore-submodules -M --no-ext-diff 156168eb97cd9d4bc0eff74d70e68438e81aa8c9..525bf401c19ea8da6872fe3c39cadd56084dae07
>>> Making HTTP GET request to ***/
validation/diffs/
>>> Cached response for HTTP GET ***/validation/diffs/ expired and was modified
>>> Making HTTP POST request to ***/api/validation/diffs/
>>> Got API Error 224 (HTTP code 400): The specified diff file could not be parsed.
>>> Error data: {u'stat': u'fail', u'reason': u'error: unable to find 036dc4f9209437e7d28b4fd12e561d8e43f5b618\nfatal: git cat-file 036dc4f9209437e7d28b4fd12e561d8e43f5b618: bad file\n', u'err': {u'msg': u'The specified diff file could not be parsed.', u'code': 224}}
Traceback (most recent call last):
 
File "/usr/local/bin/rbt", line 11, in <module>
    sys
.exit(main())
 
File "/usr/local/lib/python2.7/site-packages/rbtools/commands/main.py", line 133, in main
    command
.run_from_argv([RB_MAIN, command_name] + args)
 
File "/usr/local/lib/python2.7/site-packages/rbtools/commands/__init__.py", line 622, in run_from_argv
    exit_code
= self.main(*args) or 0
 
File "/usr/local/lib/python2.7/site-packages/rbtools/commands/post.py", line 754, in main
   
(msg_prefix, e))
rbtools
.commands.CommandError: Error validating diff


The specified diff file could not be parsed. (HTTP 400, API Error 224)

System info: OSX 10.11.3 | RBTools 0.7.5 |Python 2.7.11.
ReviewBoard: 2.5.2.

fxp

unread,
Feb 9, 2017, 12:22:24 PM2/9/17
to reviewboard, ygitt...@seekingalpha.com

I'm getting the exact same error. 
Ubuntu 16.04
RBT 0.7.7
RB 2.5.2 

It's an unfixed bug in RB

>>> Got API Error 224 (HTTP code 400): The specified diff file could not be parsed.
>>> Error data: {u'stat': u'fail', u'reason': u'error: unable to find b6387b56c32cbbc8e0731a1ca3436c5b7d04f3a5\nfatal: git cat-file b6387b56c32cbbc8e0731a1ca3436c5b7d04f3a5: bad file\n', u'err': {u'msg': u'The specified diff file could not be parsed.', u'code': 224}}

Traceback (most recent call last):



Hope there's a fix

fxp

unread,
Feb 9, 2017, 2:45:55 PM2/9/17
to reviewboard, ygitt...@seekingalpha.com
Actually looks like I was wrong. 
After more digging - the issue was because the bare git repo was out of sync on the reviewboard server.
Doing a git fetch and then rbt post made it without issues 
Reply all
Reply to author
Forward
0 new messages