GoogleCloudPlatform / cloud-profiler-python

Stackdriver Profiler Python agent is a tool that continuously gathers CPU usage information from Python applications
Apache License 2.0
28 stars 23 forks source link

Error starting the profiler #67

Closed Sancer closed 3 years ago

Sancer commented 3 years ago

When I try to start the profiler I see the following log message:

Failed to build the Discovery client for profiler (will retry after 634.737s): 'ClientOptions' object has no attribute 'credentials_file'

Environment details GAE standard python37 runtime: Python version: 3.7 google-cloud-profiler==2.0.4 gunicorn==20.0.4

Code example

 googlecloudprofiler.start(
            service=self._config.service_name,
            verbose=self._config.verbose,
            service_version=self._config.service_version,
            project_id=self._config.project_id,
            service_account_json_file=self._config.service_account_json_file)
kalyanac commented 3 years ago

66 seems related. Were there any error or warning messages during installation of dependencies?

Sancer commented 3 years ago

66 seems related. Were there any error or warning messages during installation of dependencies?

No error or warning message appears during pip installation

Successfully installed SQLAlchemy-1.3.20 attrs-20.3.0 backoff-1.10.0 cachetools-4.2.0 certifi-2020.12.5 chardet-3.0.4 citibox-gcloud-logger-0.1a0 falcon-2.0.0 google-api-core-1.16.0 google-api-python-client-1.9.0 google-auth-1.24.0 google-auth-httplib2-0.0.4 google-cloud-core-1.4.0 google-cloud-monitoring-0.36.0 google-cloud-profiler-2.0.4 google-cloud-pubsub-1.2.0 google-cloud-trace-0.24.0 googleapis-common-protos-1.52.0 grpc-google-iam-v1-0.12.3 grpcio-1.27.2 gunicorn-20.0.4 httplib2-0.18.1 idna-2.10 importlib-metadata-3.3.0 jsonschema-3.2.0 opencensus-0.7.11 opencensus-context-0.1.2 opencensus-ext-stackdriver-0.7.4 protobuf-3.14.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pymysql-0.9.3 pyrsistent-0.17.3 pytz-2020.4 pyyaml-5.3.1 requests-2.23.0 rsa-4.6 setuptools-51.0.0 six-1.15.0 typing-extensions-3.7.4.3 uritemplate-3.0.1 urllib3-1.25.11 zipp-3.4.0

kalyanac commented 3 years ago

I see cloud-pubsub-1.2.0 is getting installed. As per discussion in #66 , this issue is only fixed when google-cloud-pubsub is upgraded to 1.6.0 or greater. Can you try that?

Sancer commented 3 years ago

Thank you very much for your help 😄 . Uploading the pubsub version has been solved