#Cannot import commands from discord.ext
1 messages · Page 1 of 1 (latest)
sorry i dont know what that means
Run pip list and show the results
C:\Users\User>py -3 -m pip list
Package Version
aiohttp 3.8.3
aiohttp-apispec 2.2.3
aiosignal 1.3.1
apispec 3.3.2
async-timeout 4.0.2
attrs 22.1.0
cffi 1.15.1
charset-normalizer 2.1.1
discord 2.1.0
frozenlist 1.3.3
idna 3.4
Jinja2 3.1.2
MarkupSafe 2.1.1
marshmallow 3.19.0
multidict 6.0.2
numpy 1.23.4
packaging 21.3
pandas 1.5.1
Pillow 9.3.0
pip 22.3.1
py-cord 2.2.2
pychord 1.1.0
pycparser 2.21
PyNaCl 1.5.0
pyparsing 3.0.9
python-dateutil 2.8.2
pytz 2022.6
setuptools 65.5.0
six 1.16.0
typing_extensions 4.4.0
webargs 5.5.3
wheel 0.38.4
yarl 1.8.1
- Uninstall discord.py or any other forks of discord.py you might have with the namespace
discord.
python -m pip uninstall discord.py discord -y
2a. Install py-cord
python -m pip install py-cord
2b. Update py-cord
python pip install -U py-cord
Installing other builds:
Note: You need to have git installed. Use ?tag git to find out how to install git.
Updating the module to master branch (unstable):
pip install -U git+https://github.com/Pycord-Development/pycord
read step 1
uninstalled it and ran code, same error
uninstall py-cord and reinstall py-cord
got it
restart the editor after that
PS D:\code\code> & C:/Users/User/AppData/Local/Programs/Python/Python311/python.exe "d:/code/code/DIscord bot/discordbotcode.py"
Traceback (most recent call last):
File "d:\code\code\DIscord bot\discordbotcode.py", line 2, in <module>
from discord.ext import commands
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands_init_.py", line 18, in <module>
from .flags import *
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\site-packages\discord\ext\commands\flags.py", line 57, in <module>
@dataclass
^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1221, in dataclass
return wrap(cls)
^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 1211, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 959, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\dataclasses.py", line 816, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'discord.utils._MissingSentinel'> for field name is not allowed: use default_factory
whole new error
Don't use python 3.11
install the git version
or that
Read this
oh
'?tag' is not recognized as an internal or external command,
operable program or batch file.
imma ahve to go now but ill fix it later, probably just download a downgraded version of python like you said
you just have to enter one command at the terminal
Why are you typing ?tag in the terminal?
@random cliff do you know basic python?
like coding ? if so yeah