because open method of models.FileField doesn’t return anything
you can just use:
task.seq_file.read()
and you don’t need calculate path of file for checking if file exist. you can use task.seq_file.path:
if not os.path.isfile(task.seq_file.path):
....