Skip to content

Type Error issue #10

Open
Open
@SIMRAN88

Description

@SIMRAN88

sentiment_score = response['sentiment']
TypeError: string indices must be integers, not str

Earlier i was not facing this issue but its bugging me.

issue

my code:
set_api_key(PKEY)
import pdb; pdb.set_trace()
words = str(caption)
#words_check = words.split()
response = sentiment(words)
sentiment_score = response['sentiment']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions