Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from google.protobuf.pyext import _message → "TypeError: bases must be types" #14880

Closed
lijithomas88 opened this issue Nov 29, 2023 · 3 comments
Assignees
Labels

Comments

@lijithomas88
Copy link

lijithomas88 commented Nov 29, 2023

What version of protobuf and what language are you using?
Version: 4.25.1
Language: Python

What operating system (Linux, Windows, ...) and version?
Linux 4.14.251 aarch64 GNU/Linux (yocto distribution)

uname -a shows below output.
Linux PROCONNECT-00112B04341E 4.14.251 #1 SMP Mon Oct 25 13:18:52 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux

What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.8.11
[GCC 9.3.0] on linux

What did you do?
I have installed protobuf using pip3 install protobuf==4.25.1.
Compiled my proto file using protoc-25.1-linux-aarch_64 downloaded from https://github.com/protocolbuffers/protobuf/releases/tag/v25.1.
On running my python script to read can message and convert to protobuf, I am getting below error message.

File "/usr/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 17, in
from google.protobuf.internal import api_implementation
File "/usr/lib/python3.8/site-packages/google/protobuf/internal/api_implementation.py", line 81, in
from google.protobuf.pyext import _message
TypeError: bases must be types

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

What did you expect to see

What did you see instead?

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@lijithomas88 lijithomas88 added the untriaged auto added to all issues by default when created. label Nov 29, 2023
@anandolee anandolee added python and removed untriaged auto added to all issues by default when created. labels Nov 29, 2023
@anandolee anandolee self-assigned this Nov 29, 2023
@anandolee
Copy link
Contributor

Try to set the env PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION to 'upb' ?

@lijithomas88
Copy link
Author

Above issue is not occuring after setting this. Thanks.

@lijithomas88
Copy link
Author

closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants