我遇到以下错误:
No handlers could be found for logger "grpc._plugin_wrapping"
(完整的错误文本)
类似于https://github.com/googlecodelabs/iot-data-pipeline/issues/6
我们正在使用python2.7和google-cloud,google-cloud-language。
预期没有错误,代码以前可以正常工作。不知道是什么触发因素。 client.analyze_entities()
from google.cloud import language
creds = {
...
}
client = language.LanguageServiceClient(credentials=creds)
class EntityExtractionModule(BaseModule):
"""
Extract entities from text
"""
def __init__(self, data):
BaseModule.__init__(self, data)
def run(self):
document = language.types.Document(content=full_text, language='en', type='PLAIN_TEXT',)
r = client.analyze_entities(
document=document,
encoding_type='UTF32',
)
requests_log["entities"] = r