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' 错误 #563

Open
1 task done
wangjianjun0730 opened this issue Jan 1, 2025 · 3 comments
Open
1 task done

ModuleNotFoundError: No module named 'app' 错误 #563

wangjianjun0730 opened this issue Jan 1, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@wangjianjun0730
Copy link

是否已存在类似问题?

  • 我已搜索现有问题

当前行为

image
下载的Windows版本压缩包,解压出来的目录结构如上,点击start 运行报错如下:
image

预期行为

正常启动

重现步骤

下载windows压缩包,解压后点击update更新正常,使用start 启动浏览器报错

堆栈追踪/日志

image

Python 版本

我电脑安装的python版本是 3.12.6

操作系统

windows10

MoneyPrinterTurbo 版本

v1.2.1

其他信息

@wangjianjun0730 wangjianjun0730 added the bug Something isn't working label Jan 1, 2025
@nchzzDFTBA
Copy link

我今天也遇到同样问题,你只需要在webui/Main.py中加几行代码就行

import sys
sys.path.append('your/project') # 将此路径替换为你项目的实际根目录
from app.config import config

@wangjianjun0730
Copy link
Author

image
解压后文件是这个层级结构,这个对吗?

@catnight901220
Copy link

打開 MoneyPrinterTurbo\webui\Main.py
from app.config import config 上面加上

current_dir = os.getcwd()  
sys.path.append(os.path.join(current_dir, 'MoneyPrinterTurbo'))

修改後程式碼如下

import os
import platform
import sys
from uuid import uuid4

import streamlit as st
from loguru import logger

current_dir = os.getcwd()  
sys.path.append(os.path.join(current_dir, 'MoneyPrinterTurbo'))

from app.config import config

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