Bitcoin Forum

Bitcoin => Electrum => Topic started by: jack0m on June 07, 2022, 04:53:53 PM



Title: [Solved] Failed to run Electrum-4.2.2 on Linux Lite 6.0
Post by: jack0m on June 07, 2022, 04:53:53 PM
Hi, I installed Electrum-4.2.2 on Linux Lite 6.0, but when I try to launch the app, it won't start and the console shows the following errors:

Code:
[...]
  File "/home/jack/.local/lib/python3.10/site-packages/electrum/paymentrequest_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/home/jack/.local/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 560, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

Am I missing any library?


Title: Re: Failed to run Electrum-4.2.2 on Linux Lite 6.0
Post by: vv181 on June 07, 2022, 06:01:19 PM
It's likely because of #52b7388 (https://github.com/spesmilo/electrum/commit/52b73880f95be5cf51742fec10cde0a2e4b23de4).

Try to solve it as the workaround suggest. You can downgrade the library using:

Code:
pip install protobuf==3.20.1


Title: Re: Failed to run Electrum-4.2.2 on Linux Lite 6.0
Post by: jack0m on June 08, 2022, 07:46:38 AM
It's likely because of #52b7388 (https://github.com/spesmilo/electrum/commit/52b73880f95be5cf51742fec10cde0a2e4b23de4).

Try to solve it as the workaround suggest. You can downgrade the library using:

Code:
pip install protobuf==3.20.1

Ok, that worked out. Many thanks!


Title: Re: Failed to run Electrum-4.2.2 on Linux Lite 6.0
Post by: NotATether on June 09, 2022, 04:29:05 PM
It's likely because of #52b7388 (https://github.com/spesmilo/electrum/commit/52b73880f95be5cf51742fec10cde0a2e4b23de4).

Try to solve it as the workaround suggest. You can downgrade the library using:

Code:
pip install protobuf==3.20.1

Since this is a runtime error, you should probably create a virtualenv before/after doing this so that subsequent installs of completely unrelated packages don't alter the protobuf version that you installed manually. It can happen e.g. if you install a lot of python-based programs e.g. youtube-dl or you have a Python environment such as Anaconda.

Something like this, since you're installing & running Electrum from the command-line:
Code:
python3 -m venv electrum
source electrum/bin/activate
<install electrum & protobuf, and run electrum here>
deactivate # To get out of the virtualenv - just `deactivate` works.


Title: Re: Failed to run Electrum-4.2.2 on Linux Lite 6.0
Post by: jack0m on June 11, 2022, 03:55:20 PM
It's likely because of #52b7388 (https://github.com/spesmilo/electrum/commit/52b73880f95be5cf51742fec10cde0a2e4b23de4).

Try to solve it as the workaround suggest. You can downgrade the library using:

Code:
pip install protobuf==3.20.1

Since this is a runtime error, you should probably create a virtualenv before/after doing this so that subsequent installs of completely unrelated packages don't alter the protobuf version that you installed manually. It can happen e.g. if you install a lot of python-based programs e.g. youtube-dl or you have a Python environment such as Anaconda.

Something like this, since you're installing & running Electrum from the command-line:
Code:
python3 -m venv electrum
source electrum/bin/activate
<install electrum & protobuf, and run electrum here>
deactivate # To get out of the virtualenv - just `deactivate` works.


Ok thanks, I'll give it a try.