ModuleNotFoundError: No module named 'tomli'
PitchBlackNights opened this issue · comments
Blake Van Tassell commented
As the title says. I have triple checked that I have install tomli, but it still doesn't work.
Traceback:
Traceback (most recent call last):
File "C:\Users\pitch\Desktop\Undefined-bot\general-commands.py", line 2, in <module>
import tomllib
ModuleNotFoundError: No module named 'tomllib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\pitch\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\ext\commands\bot.py", line 606, in _load_from_module_spec
spec.loader.exec_module(lib)
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\pitch\Desktop\Undefined-bot\general-commands.py", line 4, in <module>
import tomli as tomllib
ModuleNotFoundError: No module named 'tomli'
Traceback (most recent call last):
File "C:\Users\pitch\Desktop\Undefined-bot\main.py", line 31, in <module>
bot.load_extension(extension)
File "C:\Users\pitch\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\ext\commands\bot.py", line 678, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Users\pitch\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\ext\commands\bot.py", line 609, in _load_from_ionmodule_spec
raise errors.ExtensionFailed(key, e) from e module_spec
discord.ext.commands.errors.ExtensionFailed: Extension 'general-commands' raised an error: ModuleNotFoundError: No module named 'tomli'
I am also using the default python virtual environment (python -m venv project-venv)
Blake Van Tassell commented
Nevermind, i just had to install it to system too