Here's your code with spaces replaced by dots:
#.-*-.coding:.utf-8.-*-
class.OP(object):
..def.RECEIVE_MESSAGE(self):
......print("done")
..def.NOTIFIED_INVITE_INTO_GROUP(self):
....print("done")
As you can see, the first print("done")
statement is indented by 6 spaces - change it to 4 to fix the problem.
Better still, change all indents so they are multiples of 4 spaces (ie 0, 4, 8, 12 etc), as recommended by PEP 8
#.-*-.coding:.utf-8.-*-
class.OP(object):
....def.RECEIVE_MESSAGE(self):
........print("done")
....def.NOTIFIED_INVITE_INTO_GROUP(self):
........print("done")
More detail, from Python: Myths about Indentation
How does the compiler parse the indentation? The parsing is
well-defined and quite simple. Basically, changes to the indentation
level are inserted as tokens into the token stream.
The lexical analyzer (tokenizer) uses a stack to store indentation
levels. At the beginning, the stack contains just the value 0, which
is the leftmost position. Whenever a nested block begins, the new
indentation level is pushed on the stack, and an "INDENT" token is
inserted into the token stream which is passed to the parser. There
can never be more than one "INDENT" token in a row.
When a line is encountered with a smaller indentation level, values
are popped from the stack until a value is on top which is equal to
the new indentation level (if none is found, a syntax error occurs).