This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
In python 3.11.0 monitoring_v3 import is failing #517
Labels
api: monitoring
Issues related to the googleapis/python-monitoring API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
I have followed the steps to install the client library in Python Client for Stackdriver Monitoring API
When trying to run a simple script to list the services, the import fails due to an AttributeError in proto\enums.py file
Environment details
google-cloud-monitoring
version: 2.12.0Output of pip list:
Package Version
cachetools 5.2.0
certifi 2022.12.7
charset-normalizer 2.1.1
google-api-core 2.11.0
google-auth 2.15.0
google-cloud-appengine-logging 1.2.0
google-cloud-monitoring 2.12.0
googleapis-common-protos 1.57.0
grpcio 1.51.1
grpcio-status 1.51.1
idna 3.4
pip 22.3.1
proto-plus 1.22.1
protobuf 4.21.12
pyasn1 0.4.8
pyasn1-modules 0.2.8
requests 2.28.1
rsa 4.9
setuptools 65.6.3
six 1.16.0
urllib3 1.26.13
wheel 0.38.4
Steps to reproduce
Code example
from google.cloud import monitoring_v3
Stack trace
Traceback (most recent call last):
File "...\list_services.py", line 1, in
from google.cloud import monitoring_v3
File "...\Lib\site-packages\google\cloud\monitoring_v3_init_.py", line 16, in
from google.cloud.monitoring import gapic_version as package_version
File "...\Lib\site-packages\google\cloud\monitoring_init_.py", line 21, in
from google.cloud.monitoring_v3.services.alert_policy_service.client import (
File "...\Lib\site-packages\google\cloud\monitoring_v3\services\alert_policy_service_init_.py", line 16, in
from .client import AlertPolicyServiceClient
File "...\Lib\site-packages\google\cloud\monitoring_v3\services\alert_policy_service\client.py", line 49, in
from google.cloud.monitoring_v3.services.alert_policy_service import pagers
File "...\Lib\site-packages\google\cloud\monitoring_v3\services\alert_policy_service\pagers.py", line 27, in
from google.cloud.monitoring_v3.types import alert
File "...\Lib\site-packages\google\cloud\monitoring_v3\types_init_.py", line 16, in
from .alert import (
File "...\Lib\site-packages\google\cloud\monitoring_v3\types\alert.py", line 20, in
from google.cloud.monitoring_v3.types import common
File "...\Lib\site-packages\google\cloud\monitoring_v3\types\common.py", line 50, in
class ServiceTier(proto.Enum):
File "...\Lib\site-packages\proto\enums.py", line 61, in new
idx = attrs._member_names.index(pb_options)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'index'
The text was updated successfully, but these errors were encountered: