Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错 ModuleNotFoundError: No module named 'app' #556

Open
1 task done
ethaniel86 opened this issue Dec 12, 2024 · 3 comments
Open
1 task done

报错 ModuleNotFoundError: No module named 'app' #556

ethaniel86 opened this issue Dec 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ethaniel86
Copy link

是否已存在类似问题?

  • 我已搜索现有问题

当前行为

MacOS启动前端报错
#sh webui.sh

预期行为

打开前端

重现步骤

执行 sh webui.sh

堆栈追踪/日志

ModuleNotFoundError: No module named 'app'

Traceback:
File "/opt/miniconda3/envs/MoneyPrinterTurbo/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
result = func()
^^^^^^
File "/opt/miniconda3/envs/MoneyPrinterTurbo/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec
exec(code, module.dict)
File "/Users/fulin/Downloads/MoneyPrinterTurbo/webui/Main.py", line 9, in
from app.config import config

Python 版本

v3.11

操作系统

macOS 15.1.1

MoneyPrinterTurbo 版本

v1.2.2

其他信息

No response

@ethaniel86 ethaniel86 added the bug Something isn't working label Dec 12, 2024
@yyhhyyyyyy
Copy link
Collaborator

It is highly likely that the issue lies with your PYTHON_PATH. I am uncertain about how your code editor is configured.
app is a folder within the project.
It is recommended to re-clone the project, recreate the conda environment, navigate into the project directory, and then execute webui.sh.
Alternatively, navigate into the project folder and execute the following command:

streamlit run ./webui/Main.py --browser.serverAddress="0.0.0.0" --server.enableCORS=True --browser.gatherUsageStats=False

@ethaniel86
Copy link
Author

$ export PYTHONPATH=$PWD

somehow i have to execute this to fix the error hmmm....
i'm using pyenv to install python 3.11.11 by the way not sure this is the root cause the env variable not set.

@b2522
Copy link

b2522 commented Dec 25, 2024

$ export PYTHONPATH=$PWD

somehow i have to execute this to fix the error hmmm.... i'm using pyenv to install python 3.11.11 by the way not sure this is the root cause the env variable not set.

it works. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants