Invalid syntax in Course 5 week 4 assignment 1 exercise 5 Encoder

I’m stuck in this problem!!!

Getting this error -
x += self.pos_encoding[:, :seq_len, :]
SyntaxError: invalid syntax

Can anybody help me in figuring out what’s wrong here?

When you get a syntax error in the first column, it usually means the error is in some previous line of code.

Thank you so much for the insight. Turns out I missed a parenthesis in the previous line of code.