TypeError: Argument 'other' has incorrect type (expected spacy.tokens.token.Token, got str) in Spacy

spacy

#1

In the Entity Recognition, I am getting the following error

Traceback (most recent call last):
  File "spacyNER.py", line 67, in <module>
    if isNoise(token):
  File "spacyNER.py", line 52, in isNoise
    if token in noisy_pos_tags:
TypeError: Argument 'other' has incorrect type (expected spacy.tokens.token.Token, got str)

Can you suggest what is the issue?