Pycharm wont/unable connect to console

Answered

Hello! I'm fairly new to Pycharm and this is probably a very simple fix but its been driving me cray for days, I keep coming back to solve it an am getting nowhere. I can write scripts and run scripts fine, for example i just ran a program to print "hello" and its compiles fine and prints. But when i try to use the console it always says at the bottom 'connectiing to console...'. In the console window is printed

C:\Users\JJ\AppData\Local\Microsoft\WindowsApps\python3.9.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.1\plugins\python-ce\helpers\pydev\pydevconsole.py" --mode=client --port=54154
Found 0
Found
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.1\plugins\python-ce\helpers\pydev\pydevconsole.py", line 6, in <module>
from _pydev_imps._pydev_saved_modules import thread
File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_saved_modules.py", line 21, in <module>
import xmlrpc.client as xmlrpclib
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\xmlrpc\client.py", line 135, in <module>
from decimal import Decimal
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\lib\decimal.py", line 3, in <module>
from _decimal import *
AttributeError: module 'numbers' has no attribute 'Number'
Process finished with exit code 1

1
2 comments

Do you have a module called numbers.py in your project by any chance?
If so, renaming it to something less generic should do the trick.

1

It works! You just saved my life.

0

Please sign in to leave a comment.