protobuf → "TypeError: bases must be types"

See original GitHub issue

Electrum tries importing something that throws an error. Here’s the context:

Traceback (most recent call last):
  File "/usr/bin/electrum", line 82, in <module>
    check_imports()
  File "/usr/bin/electrum", line 73, in check_imports
    from google.protobuf import descriptor
  File "/usr/lib64/python3.9/site-packages/google/protobuf/descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
TypeError: bases must be types

Protobuf version Version: 3.20.1 Electrum 4.2.1

Perhaps this is only a Protobuf issue?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
SomberNightcommented, May 28, 2022

Can you try running pip uninstall.. a few times, until it complains it cannot find the package anymore:

python3 -m pip uninstall protobuf
python3 -m pip uninstall protobuf
python3 -m pip uninstall protobuf
python3 -m pip uninstall protobuf

and then installing protobuf again:

python3 -m pip install --user protobuf==3.20.1
0reactions
Geremiacommented, Jun 2, 2022

Yes, this was due to a bad install. 3.18.1 and 3.20.1 were install on top of each other.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Vision's Python Client Quickstart throws TypeError
Google Vision's Python Client Quickstart throws TypeError: bases must be types - Stack Overflow. Stack Overflow for Teams – Start collaborating ...
Read more >
Protocol Buffer Basics: Python - Google Developers
This isn't a comprehensive guide to using protocol buffers in Python. ... If you assign a field to a value of the wrong...
Read more >
Proto Plus for Python Documentation
Parameters instance – An instance of this message type, or something compatible (accepted by the type's constructor). Returns The serialized ...
Read more >
Streamlit run with protocbuf error
_CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be ... code is out of date and must be regenerated wi th protoc >= 3.19.0.
Read more >
Protocol Buffers Guide(for Python) - 水一年 - 博客园
proto , the compiler generates the code in your chosen language you'll need to work with the message types you've described in the...
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