The script is stuck/hanging in AWS Beanstalk
Closed this issue · 3 comments
Arashnilu commented
I'm trying to use Google Cloud NLP, it works well on Windows localhost, but when i use it in Beanstalk the script is stuck when it reaches the line below and i have to restart the server again.
sentiment = client.analyze_sentiment(document=document).document_sentiment
here is all the scripts I'm using:
from google.cloud import language
from google.cloud.language import enums
from google.cloud.language import types
# Instantiates a client
client = language.LanguageServiceClient()
# The text to analyze
text = u'Hello, world!'
document = types.Document(
content=text,
type=enums.Document.Type.PLAIN_TEXT)
# Detects the sentiment of the text
sentiment = client.analyze_sentiment(document=document).document_sentiment
print('Text: {}'.format(text))
print('Sentiment: {}, {}'.format(sentiment.score, sentiment.magnitude))
munkhuushmgl commented
@Arashnilu Could you share your error log?
munkhuushmgl commented
How did you authenticate on your AWS beanstalk? Share a bit more info about how you setting up in AWS?
busunkim96 commented
Closing due to lack of activity.