1

I need some help deploying Voila app on Heroku. I'm using a free Heroku account.

The GitHub repository can be found here https://github.com/ostasis/One-dimensional-heroku

The notebook runs fine locally using Voila and runs on

Not sure if it helps but its currently at https://nameless-coast-24689.herokuapp.com/

heroku logs --tail

Shows the following

2020-06-28T05:51:24.602001+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-28T05:51:36.982425+00:00 app[web.1]: Traceback (most recent call last):
2020-06-28T05:51:36.982443+00:00 app[web.1]: File "/app/.heroku/python/bin/voila", line 8, in <module>
2020-06-28T05:51:36.982603+00:00 app[web.1]: sys.exit(main())
2020-06-28T05:51:36.982619+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/traitlets/config/application.py", line 663, in launch_instance
2020-06-28T05:51:36.982943+00:00 app[web.1]: app.initialize(argv)
2020-06-28T05:51:36.982944+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/voila/app.py", line 342, in initialize
2020-06-28T05:51:36.983141+00:00 app[web.1]: raise ValueError('provided more than 1 argument: %r' % self.extra_args)
2020-06-28T05:51:36.983159+00:00 app[web.1]: ValueError: provided more than 1 argument: ['—-port=47763', 'one-dimensional-bin-packing.ipynb']
2020-06-28T05:51:37.090291+00:00 heroku[web.1]: Process exited with status 1
2020-06-28T05:51:37.569126+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-28T05:51:51.000000+00:00 app[api]: Build succeeded
2020-06-28T05:53:26.592423+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=nameless-coast-24689.herokuapp.com request_id=8f3e8daa-5127-48cf-a1d0-c819a4e3a820 fwd="203.57.213.219" dyno= connect= service= status=503 bytes= protocol=https
2020-06-28T05:53:27.219010+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=nameless-coast-24689.herokuapp.com request_id=3587c11e-08bc-4d88-a715-43534a9e7169 fwd="203.57.213.219" dyno= connect= service= status=503 bytes= protocol=https

On mybinder.org I've used environment.yml below

name: python 3.7.4
channels:
  - conda-forge
dependencies:
  - python=3.7.4
  - appmode=0.7.0
  - pandas=0.25.1
  - matplotlib=3.1.1
  - pip=19.2.3
  - pip:
    - mip==1.8.2

and on Heruko I've have the following requirements.txt

appmode
matplotlib
mip
pandas
voila

Is there an issue with requirements.txt?

Procfile below

web: voila —-port=$PORT --no-browser one-dimensional-bin-packing.ipynb

runtime.txt below

python-3.7.6
ostasis
  • 21
  • 4

1 Answers1

0

I had the same problem. Managed to fix it by adding the --enable_nbextensions=True option to the voila command in Procfile, so it becomes in your case:

web: voila —-port=$PORT --no-browser --enable_nbextensions=True one-dimensional-bin-packing.ipynb

Found this fix in this example repo: https://github.com/voila-dashboards/voila-heroku

egpbos
  • 502
  • 4
  • 15