What version are you running?
4.02
What's the URL of the page containing the problem?
<root_url>/r/new/
What steps will reproduce the problem?
- Create a new review request
- Select a SVN repository
- Select a commit
What is the expected output? What do you see instead?
Expect to be able to create a new review request but an error is shown instead.
What operating system are you using? What browser?
Server side: Ubuntu 18.04 LTS
Client side: Windows 10, Edge browserPlease provide any additional information below.
The error in the log is as follows:
File "/usr/local/lib/python2.7/dist-packages/reviewboard/scmtools/svn/init.py", line 590, in parse_diff_header
if parsed_file.modified_file_details.endswith(b'(nonexistent)'):
AttributeError: 'NoneType' object has no attribute 'endswith'The original code on lines 590-591 did not produce an error with Review Board 3.x.
My guess is that the merge into the 4.x branch had some adverse effects.
Hmm, interesting. There must be a situation our unit tests aren't covering. Wonder what that diff looks like.
We'll get a fix into 4.0.4.
-
- New + Confirmed -
+ Release-4.0.x -
+ SCM:Subversion -
+ chipx86
Are there any changes in that diff aside from standard modifications to files, deleted files, or newly-introduced files?
As far as I can tell no.
I got the same error with the addition of the attached file to the repository. (created for testing purposes)
It looks like 'modified_file_details' is undefined in this case.
If I comment out the following two lines, I no longer get the error, but obviously this isn't a very good workaround...590 if parsed_file.modified_file_details.endswith(b'(nonexistent)'):
591 parsed_file.deleted = True
-
+
Hi, I ran into the same issue with a simple diff (attached) on 4.0.3.
if parsed_file.modified_file_details is not None and parsed_file.modified_file_details.endswith(b'(nonexistent)'):also works for me as a workaround.
This error occurs on linenum=4 started with "@@", just after the first parse of diff header.
The line is not distinguished as "is_diff_header" by the DiffParser class and modified_file_details remains None. However SVNDiffParser tries to invoke modified_file_details.endswith() and results in an AttributeError exception.
-
+