You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xxxxyzMacBook-Air:TikTokDownloader xxxxyz$ python -m main.py
Traceback (most recent call last):
File "", line 189, in _run_module_as_main
File "", line 112, in _get_module_details
File "/Users/xxxxyz/TikTokDownloader/main.py", line 4, in
from src.application import TikTokDownloader
ModuleNotFoundError: No module named 'src.application'
The text was updated successfully, but these errors were encountered:
Hey @Vander-Bilt, I'm here to help you with that bug! Let's squash it together.
The error ModuleNotFoundError: No module named 'src.application' suggests that Python cannot find the src.application module. Here are a few steps you can take to resolve this issue:
Check Directory Structure: Ensure that there is a src directory in the TikTokDownloader project and that it contains an application.py file. This file should define the TikTokDownloader class or function you are trying to import.
Verify PYTHONPATH: Make sure that the src directory is included in your PYTHONPATH. You can temporarily add it by running the following command in your terminal:
Replace /path/to/TikTokDownloader with the actual path to your TikTokDownloader directory.
Run the Script Correctly: Instead of using python -m main.py, try running the script directly with:
python main.py
This assumes you are in the TikTokDownloader directory.
Check for __init__.py: Ensure that the src directory contains an __init__.py file. This file can be empty but is necessary for Python to recognize the directory as a package.
These steps should help you resolve the import error. If the problem persists, double-check the directory structure and ensure that all necessary files are in place.
xxxxyzMacBook-Air:TikTokDownloader xxxxyz$ pyenv versions
system
2.7.18
3.9.20
我使用pyenv,设置了python 3.12.6环境. 但是启动的时候报错了. 我是python新手,感觉是导入包没有成功。能帮忙看看吗,十分感谢!!
xxxxyzMacBook-Air:TikTokDownloader xxxxyz$ python -m main.py
Traceback (most recent call last):
File "", line 189, in _run_module_as_main
File "", line 112, in _get_module_details
File "/Users/xxxxyz/TikTokDownloader/main.py", line 4, in
from src.application import TikTokDownloader
ModuleNotFoundError: No module named 'src.application'
The text was updated successfully, but these errors were encountered: