App fails to deploy on streamlit.io

My app, which was working, now always fails to deploy with the following error:

File "/home/appuser/venv/bin/streamlit", line 8, in <module>

    sys.exit(main())

  File "/home/appuser/venv/lib/python3.7/site-packages/click/core.py", line 1130, in __call__

    return self.main(*args, **kwargs)

  File "/home/appuser/venv/lib/python3.7/site-packages/click/core.py", line 1055, in main

    rv = self.invoke(ctx)

  File "/home/appuser/venv/lib/python3.7/site-packages/click/core.py", line 1657, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/home/appuser/venv/lib/python3.7/site-packages/click/core.py", line 1404, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/home/appuser/venv/lib/python3.7/site-packages/click/core.py", line 760, in invoke

    return __callback(*args, **kwargs)

  File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/cli.py", line 204, in main_run

    _main_run(target, args, flag_options=kwargs)

  File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/cli.py", line 232, in _main_run

    command_line = _get_command_line_as_string()

  File "/home/appuser/venv/lib/python3.7/site-packages/streamlit/cli.py", line 221, in _get_command_line_as_string

    cmd_line_as_list.extend(click.get_os_args())

AttributeError: module 'click' has no attribute 'get_os_args'```
I have tried re-installing the click library to match my local version, but this does not help either.
1 Like

Exately same problem here , my app was working ,did you manage to find the problem

Looks like click removed get_os_args today: github

I think it’ll take a patch to streamlit library (get_os_args is removed, use sys.argv[1:] instead), so in the meantime pinning click<=8.0.4 should solve it. (worked locally for me running with python -m streamlit run app.py)

ex requirements.txt:

click<=8.0.4
streamlit

EDIT someone already opened a streamlit issue

1 Like

Thank you very much indeed , will check that

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.