Hosting in heroku: Issues and Solutions

Common Problems and Solutions during Heroku hosting

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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`