ModuleNotFoundError: No module named 'google.cloud.automl_v1beta1.proto'

Viewed 602

I am trying to follow this tutorial on Google Cloud Platform, https://github.com/GoogleCloudPlatform/ai-platform-samples/blob/master/notebooks/samples/tables/census_income_prediction/getting_started_notebook.ipynb, however, I am running into issues when I try to import the autoML module, specifically the below two lines

# AutoML library.
from google.cloud import automl_v1beta1 as automl
import google.cloud.automl_v1beta1.proto.data_types_pb2 as data_types

The first line works, but for the 2nd one, I get the error: ModuleNotFoundError: No module named 'google.cloud.automl_v1beta1.proto'. It seems for some reason there is no module called proto and I cannot figure out how to resolve this. There are a couple of posts regarding the issue of not being able to find module google.cloud. In my case I am able to import automl_v1beta1 from google.cloud but not proto.data_types_pb2 from google.cloud.automl_v1beta1

1 Answers

I think you can:

from google.cloud import automl_v1beta1 as automl
import google.cloud.automl_v1beta1.types as data_types

Or:

import google.cloud.automl_v1beta1 as automl
import google.cloud.automl_v1beta1.types as data_types

But (!) given the import errors, there may be other changes to the SDK in the code that follows.

Related