Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Import error in samples/snippets/schema.py #889

@acocuzzo

Description

@acocuzzo

Repro:

~$ pip install avro
...
Successfully installed avro-1.11.1

~$ python3
Python 3.10.9 (main, Dec  7 2022, 13:47:07) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import avro
>>> avro.schema
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'avro' has no attribute 'schema'

We should do "import avro.schema as schema" instead.

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/python-pubsub API.samplesIssues that are directly related to samples.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions