You've got two errors in your program, missing a quote and a colon. Are these problems in the original?
On my GNU/linux system, having saved the program below as p.py and also having the unixdict file available, the program works fine. Do you have any words (lines) longer than 20 characters?
$ python3 p.py
with open('/home/lambertdw/Downloads/books/unixdict.txt') as fin:
for line in fin:
if 20 < len(word):