Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

ImageAnnotatorClient throws error on AWS SageMaker notebook: Protocol message FieldDescriptorProto has no "proto3_optional" field. #60

@idanh

Description

@idanh

Environment details

  • OS type and version: SageMaker notebooks: AWS linux 2
  • Python version: Python 3.6.10 :: Anaconda, Inc.
  • pip version: pip 20.0.2
  • google-cloud-vision version: 2.0.0

Steps to reproduce

  1. from google.cloud import vision

Code example

from google.cloud import vision

Stack trace

Screen Shot 2020-10-06 at 11 12 38

~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/vision/__init__.py in <module>
     16 #
     17 
---> 18 from google.cloud.vision_v1.services.image_annotator.async_client import (
     19     ImageAnnotatorAsyncClient,
     20 )

~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/vision_v1/__init__.py in <module>
     19 from google.cloud.vision_helpers import VisionHelpers
     20 
---> 21 from .services.image_annotator import ImageAnnotatorClient as IacImageAnnotatorClient
     22 from .services.product_search import ProductSearchClient
     23 from .types.geometry import BoundingPoly

~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/vision_v1/services/image_annotator/__init__.py in <module>
     16 #
     17 
---> 18 from .client import ImageAnnotatorClient
     19 from .async_client import ImageAnnotatorAsyncClient
     20 

~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/vision_v1/services/image_annotator/client.py in <module>
     35 from google.api_core import operation  # type: ignore
     36 from google.api_core import operation_async  # type: ignore
---> 37 from google.cloud.vision_v1.types import image_annotator
     38 
     39 from .transports.base import ImageAnnotatorTransport, DEFAULT_CLIENT_INFO

~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/vision_v1/types/__init__.py in <module>
     16 #
     17 
---> 18 from .geometry import (
     19     Vertex,
     20     NormalizedVertex,

~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/vision_v1/types/geometry.py in <module>
     25 
     26 
---> 27 class Vertex(proto.Message):
     28     r"""A vertex represents a 2D point in the image.
     29     NOTE: the vertex coordinates are in the same scale as the

~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in __new__(mcls, name, bases, attrs)
    213         desc = descriptor_pb2.DescriptorProto(
    214             name=name,
--> 215             field=[i.descriptor for i in fields],
    216             oneof_decl=[
    217                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()

~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in <listcomp>(.0)
    213         desc = descriptor_pb2.DescriptorProto(
    214             name=name,
--> 215             field=[i.descriptor for i in fields],
    216             oneof_decl=[
    217                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()

~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/fields.py in descriptor(self)
    109                 type_name=type_name,
    110                 json_name=self.json_name,
--> 111                 proto3_optional=self.optional,
    112             )
    113 

ValueError: Protocol message FieldDescriptorProto has no "proto3_optional" field.

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

Labels

api: visionIssues related to the googleapis/python-vision API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions