foreman启动没有名为myapp的模块

2024-06-01 20:48:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我遵循heroku快速入门指南: https://devcenter.heroku.com/articles/getting-started-with-python

我被困在工头的开始部分。这就是我的目录。我只是在运行一个基本的网络应用程序。没有框架什么的。在

soapbar/
    Procfile.txt
    soapbar/
        soapbar.py
    venv/
        Include/
        Lib/
        Scripts/ 

这是堆栈跟踪:

^{pr2}$

有什么想法吗?在


Tags: https程序目录com框架herokuwith指南
1条回答
网友
1楼 · 发布于 2024-06-01 20:48:23

将名为__init__.py的文件添加到soapbar/文件夹中。留为空白。在

The __init__.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later on the module search path. In the simplest case, __init__.py can just be an empty file, but it can also execute initialization code for the package or set the __all__ variable.

来源:http://docs.python.org/2/tutorial/modules.html

相关问题 更多 >