This issue is described on my blog by Andreas at: http://kevin.deldycke.com/2010/08/maildir-deduplication-script-python/comment-page-1/#comment-8770
This occurs after replacing line 212 by
subject, count = re.subn('\s+', ' ', subject)
print "\nSubject: " + subject
print "\nNo Subject"
as pointed out in the blog.
This issue is 2 years old and maildir-deduplicate.py dramatically changed since then. This script also moved to its own repository, so if this issue is still current, please open a new ticket over there.