[
https://issues.apache.org/jira/browse/MINIFICPP-1444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marton Szasz resolved MINIFICPP-1444.
-------------------------------------
Resolution: Fixed
> Remove the SentimentAnalyzer python dependece on the non-fixed google cloud
> API-s
> ---------------------------------------------------------------------------------
>
> Key: MINIFICPP-1444
> URL: https://issues.apache.org/jira/browse/MINIFICPP-1444
> Project: Apache NiFi MiNiFi C++
> Issue Type: Improvement
> Affects Versions: 0.7.0
> Reporter: Adam Hunyadi
> Priority: Minor
> Fix For: 1.0.0
>
>
> *Background:*
> Building a clean MiNiFi agent with Python enabled, can produce errors
> preventing startup. These originate from the imports of SentimentAnalyzer.py.
> > ImportError: cannot import name 'enums' from "'google.cloud.language'"
> It seems like this is part of an google cloud API is not properly fixed. On
> looking up the google cloud source, I needed to modify the our imports to
> include these:
> {code:bash|Title: Example google cloud import paths}
> ➜ cloud egrep -R "import.*enums" .
> ./language_v1beta2/gapic/language_service_client.py:from
> google.cloud.language_v1beta2.gapic import enums
> ./language_v1/gapic/language_service_client.py:from
> google.cloud.language_v1.gapic import enums
> ➜ cloud egrep -R "import.*types" .
> ./translate.py:from google.cloud.translate_v3 import types
> {code}
> *Proposal:*
> One would need to investigate the use-cases of the SentimentAnalyzer script
> and either remove it, or remove the possibility of the script preventing
> MINiFi startups.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)