部署到Heroku的Dash应用程序:gunicorn.errors.HaltServer:<HaltServer'Worker引导失败。' 3>

时间:2020-08-11 12:20:37

标签: python heroku plotly-dash

我正在将Dash应用程序部署到Heroku。该应用程序可在localhost上运行,但是,当尝试部署到Heroku时,我运行{{ user.role.name }}

我的文件结构是这样的:

public function roles()
    {
        
        return $this->belongsToMany('App\Role');
    }

Procfile内容:

public function users()
    {
        return $this->belongsToMany('App\User');
    }

错误回溯:

gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

index.py上的内容

app.py
index.py
Procfile
requirements.txt
-- Tabs
--- Tab1.py
--- Tab2.py 

1 个答案:

答案 0 :(得分:1)

您的Procfile指示gunicorn应在server文件中将Flask服务器作为名为index.py的变量查找(基本上就是gunicorn index:server的意思)。但是,似乎您尚未定义该变量,也就是说,您应该添加一行

server = app.server

在您的index.py文件中(或更改您的Procfile)。