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

AttributeError: 'NoneType' object has no attribute 'message_types_by_name' #91

@ross

Description

@ross

Seeing the following with 1.55.1b1, which does not appear to happen with 1.55.0.

_________ ERROR collecting tests/test_octodns_provider_googlecloud.py __________
tests/test_octodns_provider_googlecloud.py:12: in <module>
    from octodns_googlecloud import GoogleCloudProvider
/tmp/ci-RvdXdu3JOD/lib/python3.10/site-packages/octodns_googlecloud-0.0.1-py3.10.egg/octodns_googlecloud/__init__.py:11: in <module>
    ???
/tmp/ci-RvdXdu3JOD/lib/python3.10/site-packages/google_cloud_dns-0.34.0-py3.10.egg/google/cloud/dns/__init__.py:32: in <module>
    from google.cloud.dns.zone import Changes
/tmp/ci-RvdXdu3JOD/lib/python3.10/site-packages/google_cloud_dns-0.34.0-py3.10.egg/google/cloud/dns/zone.py:19: in <module>
    from google.cloud.exceptions import NotFound
/tmp/ci-RvdXdu3JOD/lib/python3.10/site-packages/google_cloud_core-2.2.3-py3.10.egg/google/cloud/exceptions/__init__.py:24: in <module>
    from google.api_core import exceptions
/tmp/ci-RvdXdu3JOD/lib/python3.10/site-packages/google_api_core-2.7.1-py3.10.egg/google/api_core/exceptions.py:28: in <module>
    from google.rpc import error_details_pb2
/tmp/ci-RvdXdu3JOD/lib/python3.10/site-packages/googleapis_common_protos-1.55.1b1-py3.10.egg/google/rpc/error_details_pb2.py:39: in <module>
    _RETRYINFO = DESCRIPTOR.message_types_by_name["RetryInfo"]
E   AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

I was updating dependencies for the googlecloud octoDNS provider, the PR updates to 1.55.0, but the tests also run against a venv installed version with the latest versions of all dependencies. It's the latter of those two cases that picks up 1.55.1b1 and fails.
PR: octodns/octodns-googlecloud#5
Failing Test: https://github.com/octodns/octodns-googlecloud/runs/5499296341?check_suite_focus=true

Environment details

  • Programming language: Python
  • OS: Linux/OSX
  • Language runtime version: 3.x
  • Package version: 1.55.1b1 (1.55.0 does not exhibit the issue)

Steps to reproduce

This is not the normal octoDNS workflow, but it's the most direct way to the problem.

  1. git clone https://github.com/octodns/octodns-googlecloud
  2. cd octodns-googlecloud
  3. python3 -m venv env
  4. source env/bin/activate
  5. python setup.py install
  6. pip install pytest
  7. pytest

If you edit setup.py, add 'googleapis-common-protos==1.55.0' to install_requires, blow away the venv, and repeat steps 3-7 things work.

I've tried digging into what changed, but thus far haven't had any luck.

/cc octodns/octodns-googlecloud#5

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.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