Open ringsaturn opened 3 weeks ago
Context
I tried to build a message with viewport.
Expected Behavior:
Run as normally without exception.
Actual Behavior:
Failde with ImportError: cannot import name 'viewport_pb2' from 'google.geo.type'
ImportError: cannot import name 'viewport_pb2' from 'google.geo.type'
google-geo-type v0.3.10
file: sample.proto
syntax = "proto3"; import "google/geo/type/viewport.proto"; import "google/protobuf/timestamp.proto"; message ImageItem { string path = 1; google.protobuf.Timestamp timestamp = 2; google.geo.type.Viewport viewport = 3; }
file: sample_pb2
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # NO CHECKED-IN PROTOBUF GENCODE # source: sample.proto # Protobuf Python Version: 5.28.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder _runtime_version.ValidateProtobufRuntimeVersion( _runtime_version.Domain.PUBLIC, 5, 28, 2, '', 'sample.proto' ) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.geo.type import viewport_pb2 as google_dot_geo_dot_type_dot_viewport__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0csample.proto\x1a\x1egoogle/geo/type/viewport.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"u\n\tImageItem\x12\x0c\n\x04path\x18\x01 \x01(\t\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08viewport\x18\x03 \x01(\x0b\x32\x19.google.geo.type.Viewportb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sample_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: DESCRIPTOR._loaded_options = None _globals['_IMAGEITEM']._serialized_start=81 _globals['_IMAGEITEM']._serialized_end=198 # @@protoc_insertion_point(module_scope)
Thanks for filing this issue! We'll investigate.
Determine this is the right repository
Summary of the issue
Context
I tried to build a message with viewport.
Expected Behavior:
Run as normally without exception.
Actual Behavior:
Failde with
ImportError: cannot import name 'viewport_pb2' from 'google.geo.type'
API client name and version
google-geo-type v0.3.10
Reproduction steps: code
file: sample.proto
file: sample_pb2