这是我的简单项目。当我尝试运行app.py时出现错误:
Traceback (most recent call last):
File "worker/app.py", line 4, in <module>
from worker import app_config
ModuleNotFoundError: No module named 'worker'
以下是app.py的内容
import logging
from logging import config
from worker import app_config
from worker import controller
config.dictConfig(app_config.LOGGING)
log = logging.getLogger(__name__)
def start():
log.info("Worker started")
controller.update_whats_new()
log.info("Worker exit")
if __name__ == "__main__":
start()
init .py为空,PYTHONPATH env也为空