Closed SukiEva closed 3 years ago
Thanks. But I've never encountered this error, can you provide more details, like your Python version and the error log?
Thanks. But I've never encountered this error, can you provide more details, like your Python version and the error log?
In order to facilitate the deployment, I used the python project manager of the BT panel, which seems to be unable to recognize the folder startup correctly.
Log below
ModuleNotFoundError: No module named 'nazurin'
Traceback (most recent call last):
File "/root/.pyenv/versions/3.7.8/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/root/.pyenv/versions/3.7.8/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/www/wwwroot/nazurin/nazurin/__main__.py", line 9, in <module>
from nazurin import config, dp
ModuleNotFoundError: No module named 'nazurin'
I searched, and it seems that 'python -m' is ok, and when I use it on the command line, it works well...
So, this seems to be a problem of the manager. However, adding the above can make it easier to start the project through the folder.
When I try to use
python -m nazurin
to run the bot, the 'nazurin not found' error pops up.Fix it by Using module's own objects in main.py