Skip to content

Type Error issue #10

Open
Open

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']

Activity

  1. ahwankumar commented on Nov 10, 2017

    @ahwankumar
    Member

    @SIMRAN88 We are unable to reproduce the error. Try printing the content of the variable 'response'. This will help you in debugging the issue.

    Also try updating the paralleldots package from pypi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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