Hosting in heroku: Issues and Solutions

Athul R T | Jun 11, 2021 min read

1. Failed to push some refs to git

To https://git.heroku.com/covid19-forecast-kerala.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/covid19-forecast-kerala.git' ```


#### Solution
Run `heroku builds:cancel`. Then run `git push heroku main`

### 2.  Failed to find attribute 'server' in 'app'

Check gunicorn run from local machine: `gunicorn app:server --preload -b 0.0.0.0:5000 ` Run this command from the same folder.

Add `server = app.server` under `app = dash.Dash()` in `app.py`