'This is my code and I'm getting an error like TypeError: The `text` argument passed to `__init__(text)` must be a s

This is my code and I'm getting an error like TypeError: The text argument passed to __init__(text) must be a s

Function to calculate subjectivity:

from textblob import TextBlob
def getSubjectivity(title):
    return TextBlob(title).sentiment.subjectivity
    # function to calculate polarity
def getPolarity(title):
    return TextBlob(title).sentiment.polarity

Function to analyze the reviews:

def analysis(Score):
    if Score < 0:
        return 'Negative'
    elif Score == 0:
        return 'Neutral'
    else:
        return 'Positive'


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source