Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

RetryErrors obscure actual errors - Language API #3900

Copy link
Copy link
@mr-ubik

Description

@mr-ubik
Issue body actions

Similar to #3083
I am having the exact issue but with the google-cloud-language package. I am streaming tweets (working with Apache Beam) to the Language Sentiment Analysis API but some of them seem to break it.

class SentimentAnalyzerDoFn(beam.DoFn):
    def process(self, element):
        """Takes a parsed tweet as input and add to it its sentiment score and values"""
        from google.cloud import language
        client = language.LanguageServiceClient()
        document = language.types.Document(
            content=element['tweet'].encode('utf-8'),
            type='PLAIN_TEXT')
        response = client.analyze_sentiment(
            document=document,
            encoding_type='UTF8')
        sentiment = response.document_sentiment
        element['sentiment_score'] = sentiment.score
        element['sentiment_magnitude'] = sentiment.magnitude
        yield element

The error I am getting is this:

RetryError: Exception occurred in retry method that was not classified as transient [while running 'SentimentAnalasys']

Is there a way to investigate it?

Metadata

Metadata

Labels

api: languageIssues related to the Cloud Natural Language API API.Issues related to the Cloud Natural Language API API.status: duplicateDuplicate.Duplicate.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.