Deploy to Heroku failed

I am looking to deploy a service through Heroku. This was working before making updates. I had made updated which required openpyxl and altair. Following adding these to packages to my requirements file I continually have the following logs when accessing through

heroku logs --tail

2022-03-29T07:37:57.573558+00:00 app[web.1]: 2022-03-29 07:37:57.573 INFO    matplotlib.font_manager: generated new fontManager
2022-03-29T07:37:59.360980+00:00 app[web.1]: Traceback (most recent call last):
2022-03-29T07:37:59.360997+00:00 app[web.1]: File "/app/.heroku/python/bin/streamlit", line 8, in <module>
2022-03-29T07:37:59.361107+00:00 app[web.1]: sys.exit(main())
2022-03-29T07:37:59.361116+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
2022-03-29T07:37:59.361365+00:00 app[web.1]: return self.main(*args, **kwargs)
2022-03-29T07:37:59.361373+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1055, in main
2022-03-29T07:37:59.361605+00:00 app[web.1]: rv = self.invoke(ctx)
2022-03-29T07:37:59.361613+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
2022-03-29T07:37:59.361914+00:00 app[web.1]: return _process_result(sub_ctx.command.invoke(sub_ctx))
2022-03-29T07:37:59.361921+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
2022-03-29T07:37:59.362173+00:00 app[web.1]: return ctx.invoke(self.callback, **ctx.params)
2022-03-29T07:37:59.362182+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/click/core.py", line 760, in invoke
2022-03-29T07:37:59.362347+00:00 app[web.1]: return __callback(*args, **kwargs)
2022-03-29T07:37:59.362356+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/streamlit/cli.py", line 204, in main_run
2022-03-29T07:37:59.362447+00:00 app[web.1]: _main_run(target, args, flag_options=kwargs)
2022-03-29T07:37:59.362454+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/streamlit/cli.py", line 232, in _main_run
2022-03-29T07:37:59.362545+00:00 app[web.1]: command_line = _get_command_line_as_string()
2022-03-29T07:37:59.362558+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.9/site-packages/streamlit/cli.py", line 221, in _get_command_line_as_string
2022-03-29T07:37:59.362639+00:00 app[web.1]: cmd_line_as_list.extend(click.get_os_args())
2022-03-29T07:37:59.362668+00:00 app[web.1]: AttributeError: module 'click' has no attribute 'get_os_args'
2022-03-29T07:37:59.845082+00:00 heroku[web.1]: Process exited with status 1
2022-03-29T07:37:59.903300+00:00 heroku[web.1]: State changed from starting to crashed

Does anyone have any idea on how to fix it? I have updated the setup.sh file a few times based on some previous information that I could find but to no avail.

Thank you in advance.

It has nothing to do with the app itself, it is a dependency issue of streamlit that popped up yesterday, due to a change in the library click that is used by streamlit.
You have to explicitly downgrade the click library below 8.1.0 in your requirements.txt file.
I am not sure about the right version, the user reports here in the forum differ a bit about the right version.
See the threads about this issue.
Try it with:

click==8.0.4

Thank you so much. This solved it. Deploy works perfectly now :slight_smile:

New solution since yesterday:

streamlit>=1.8.1