Write output file, collating groups of up to 7 input lines
You should avoid writing code with exception-handling altogether.  Usually, when you want to write a fancy loop in Python, the itertools module is your friend.  In this case, I would take advantage of itertools.groupby() to form groups of lines, assisted by itertools.count() to provide the line numbers.

import itertools

def chunks(iterable, n):
    i = itertools.count()
    for _, group in itertools.groupby(iterable, lambda _: next(i) // n):
        yield group

with open('data.txt') as read_f, open('new_data.txt', 'w') as write_f:
    for group in chunks(read_f, 7):
        print(' '.join(line.rstrip() for line in group), file=write_f)


A few other minor changes:


You only need one with block to open both files.
line.rstrip() is more convenient than lambda x: x.replace("\n", '')
print(…, file=write_file) is slightly more elegant than write_file.write(… + '\n').