question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: bases must be types

See original GitHub issue

google-api-core released a new version recently on September 2nd which is 2.10.0. The latest version install protobuf version > 4 which does not work with latest version of opencensus-ext-azure.

Steps to reproduce. Install google-api-core and opencensus-ext-azure

What is the expected behavior? Imports should work fine

What is the actual behavior?

  File "opencensusmonitor.py", line 3, in <module>
    from opencensus.ext.azure.log_exporter import AzureLogHandler
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/opencensus/ext/azure/log_exporter/__init__.py", line 34, in <module>
    from opencensus.ext.azure.metrics_exporter import statsbeat_metrics
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/opencensus/ext/azure/metrics_exporter/__init__.py", line 31, in <module>
    from opencensus.metrics import transport
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/opencensus/metrics/transport.py", line 20, in <module>
    from opencensus.trace import execution_context
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/opencensus/trace/__init__.py", line 15, in <module>
    from opencensus.trace.span import Span
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/opencensus/trace/span.py", line 32, in <module>
    from opencensus.trace import status as status_module
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/opencensus/trace/status.py", line 15, in <module>
    from google.rpc import code_pb2
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/google/rpc/code_pb2.py", line 21, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 40, in <module>
    from google.protobuf.internal import api_implementation
  File "/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/google/protobuf/internal/api_implementation.py", line 104, in <module>
    from google.protobuf.pyext import _message
TypeError: bases must be types

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pratap-is-herecommented, Oct 20, 2022

@leonbravo - we were having the same issue with Azure Synapse.

I believe this is due to a dependency conflict with the tensor packages set in the Apache Spark pool requirements since they are listed at 2.4.x (older versions).

Upgrading tensorflow worked for me with this requirements.txt:

tensorflow==2.10.0
opencensus-ext-azure==1.1.7

Worked like a charm in Synapse. Thanks @kottofy !

1reaction
leonbravocommented, Sep 27, 2022

same issue in Azure Synapse

Read more comments on GitHub >

github_iconTop Results From Across the Web

from google.protobuf.pyext import _message → "TypeError ...
from google. protobuf. pyext import _message → "TypeError: bases must be types" · Issue #10012 · protocolbuffers/protobuf · GitHub.
Read more >
Google Vision's Python Client Quickstart throws TypeError
Google Vision's Python Client Quickstart throws TypeError: bases must be types · 1. You generally "read" stacktraces bottom up. · Ah I see,...
Read more >
getting "TypeError: bases must be 'type' objects" - Anvil Q&A
Given that, bases must be 'type' objects can be interpreted as The parent must be a 'class' object , but the original error...
Read more >
Error when importing TensorFlow | Apple Developer Forums
TF_bfloat16_type() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle. Any ideas on what I...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
In Python, all exceptions must be instances of a class that derives from BaseException. In a try statement with an except clause that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found