- #1
- 3,097
- 7,628
I'm trying to run electrum (written in python) from the command line on Ubuntu 20. I have 2 similar computers. The first one has version 4.0.4 and once in the electrum folder, I type
My problem is with my other computer - which has the latest version 4.0.9 - where, first odd problem, I have to type
But the worst part is that it fails to run. I get this backtrace:
I know what happen, but I don't understand why. (I'm a newbie with python) In the electrum folder there is a 'logging.py' and the
I'm tired and I would gladly accept any help.
electrum
(the name of the executable file) and it executes whatever command I ask for.My problem is with my other computer - which has the latest version 4.0.9 - where, first odd problem, I have to type
python3 electrum
to get a response. I even changed the header of the file from #!/usr/bin/env python3
to #!/usr/bin/python3
, still need to call python3 first (and the file is executable).But the worst part is that it fails to run. I get this backtrace:
Code:
File "electrum", line 39, in <module>
import asyncio
File "/usr/lib/python3.8/asyncio/__init__.py", line 8, in <module>
from .base_events import *
File "/usr/lib/python3.8/asyncio/base_events.py", line 18, in <module>
import concurrent.futures
File "/usr/lib/python3.8/concurrent/futures/__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 7, in <module>
import logging
File "/root/Electrum-4.0.9/electrum/logging.py", line 15, in <module>
class LogFormatterForFiles(logging.Formatter):
AttributeError: partially initialized module 'logging' has no attribute 'Formatter' (most likely due to a circular import)
I know what happen, but I don't understand why. (I'm a newbie with python) In the electrum folder there is a 'logging.py' and the
import logging
is clearly referring to a file in the 'python3.8' folder, but it chooses the local one instead (hence the circular import problem). I don't know what to do with that (specifiying a folder?), especially since it works fine on the other machine.I'm tired and I would gladly accept any help.