Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

int() argument must be a string, a bytes-like object or a number, not 'dict' #105

@pmantaj

Description

@pmantaj

Environment details

  • OS type and version: macOS Big Sur
  • Python version: Python 3.6.10
  • pip version: 21.0.1
  • google-cloud-monitoring version: 2.2.0

Steps to reproduce

  1. Just use the following import from google.cloud import monitoring_v3 in any file.

Code example

from google.cloud import monitoring_v3

Stack trace

 File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/__init__.py", line 18, in <module> from .services.alert_policy_service import AlertPolicyServiceClient File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/services/alert_policy_service/__init__.py", line 18, in <module> from .client import AlertPolicyServiceClient File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/services/alert_policy_service/client.py", line 35, in <module> from google.cloud.monitoring_v3.services.alert_policy_service import pagers File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/services/alert_policy_service/pagers.py", line 29, in <module> from google.cloud.monitoring_v3.types import alert File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/types/__init__.py", line 18, in <module> from .alert import AlertPolicy File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/types/alert.py", line 21, in <module> from google.cloud.monitoring_v3.types import common File "venv/lib/python3.6/site-packages/google/cloud/monitoring_v3/types/common.py", line 51, in <module> class ServiceTier(proto.Enum): File "venv/lib/python3.6/site-packages/proto/enums.py", line 72, in __new__ cls = super().__new__(mcls, name, bases, attrs) File ".pyenv/versions/3.6.10/lib/python3.6/enum.py", line 201, in __new__ enum_member = __new__(enum_class, *args) TypeError: int() argument must be a string, a bytes-like object or a number, not 'dict' 

The problem is in the file: google/cloud/monitoring_v3/types/common.py and class ServiceTier(proto.Enum). When I remove the property _pb_options = {"deprecated": True} everything works correctly.

Thanks!

Metadata

Metadata

Assignees

Labels

api: monitoringIssues related to the googleapis/python-monitoring API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to 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