0

I'm trying to deploy a JustPy app on Heroku. I'm new to both.

Base code, from https://justpy.io/tutorial/getting_started/

# saved as app.py
import justpy as jp
app = jp.app # added for deployment

def hello_world():
    wp = jp.WebPage()
    jp.Hello(a=wp)
    return wp

jp.justpy(hello_world)

To deploy to a Heroku account, get the Heroku tools from: https://devcenter.heroku.com/articles/heroku-cli

From your project folder:

pip install gunicorn
pip freeze > requirements.txt
# create Procfile web:- gunicorn app:app
# create runtime.txt:- Python 3.9.5 
heroku login
heroku create justpyhi
git init
git add .   
git config --global user.email "myemail@hotmail.com"
git config --global user.name "whateverusername"
git commit -m "first commit"
heroku git:remote --app justpyhi
git push heroku master
heroku open

...and I get the following errors:

Starting process with command `gunicorn mainheroku l`
app[web.1]: bash: gunicorn: command not found
heroku[web.1]: Process exited with status 127
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: State changed from crashed to starting
app[api]: Build succeeded

[Updated:] I'm getting this further error:

-----> Building on the Heroku-20 stack
-----> Using buildpack: heroku/python
-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
       More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
 !     Push failed

What am I doing wrong? All help gratefully received!

Roger
  • 36
  • 1
  • 7
  • Some of the answers here may help: https://stackoverflow.com/q/33021874/42346 Basically it seems worth a shot to uninstall requirements remotely, then reinstall. – mechanical_meat May 17 '21 at 18:50
  • Thanks for your reply! I've been thru everything on that page. I'll try going back to a very simple flask app and building up from there. Very frustrating tho. – Roger May 17 '21 at 20:17
  • 1
    In the same boat here. Been following instructions in https://justpy.io/tutorial/deployment/ and https://justpy.io/reference/justpy/ but could not make it work. My URL is showing: Internal Server Error. – Mike Aug 08 '21 at 16:23

0 Answers0