Error when deploy app on Streamlit

I build app on streamlit but error; You are using pip version 22.0.3; however, version 23.0.1 is available.

Successfully installed MarkupSafe-2.1.2 altair-4.2.2 attrs-22.2.0 blinker-1.5 cachetools-5.3.0 certifi-2022.12.7 charset-normalizer-3.0.1 click-8.1.3 decorator-5.1.1 entrypoints-0.4 gitdb-4.0.10 gitpython-3.1.31 idna-3.4 importlib-metadata-6.0.0 jinja2-3.1.2 jsonschema-4.17.3 markdown-it-py-2.1.0 mdurl-0.1.2 numpy-1.24.2 packaging-23.0 pandas-1.5.3 pillow-9.4.0 protobuf-3.20.3 pyarrow-11.0.0 pydeck-0.8.0 pygments-2.14.0 pympler-1.0.1 pyrsistent-0.19.3 python-dateutil-2.8.2 pytz-2022.7.1 pytz-deprecation-shim-0.1.0.post0 requests-2.28.2 rich-13.3.1 semver-2.13.0 six-1.16.0 smmap-5.0.0 streamlit-1.18.1 toml-0.10.2 toolz-0.12.0 tornado-6.2 typing-extensions-4.5.0 tzdata-2022.7 tzlocal-4.2 urllib3-1.26.14 validators-0.20.0 watchdog-2.2.1 zipp-3.14.0
WARNING: You are using pip version 22.0.3; however, version 23.0.1 is available.
You should consider upgrading via the '/home/appuser/venv/bin/python -m pip install --upgrade pip' command.

→ I upgrade pip new version but error above
Help me

That is a warning, not an error. You should be fine with the default pip, there is no need to upgrade it.

but not run

You can share info about this case. Tks you

That is unrelated to the warning. What does it do instead of running?

At now, war error ModuleNotFoundError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:

Traceback (most recent call last):
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
  File "/app/hoptai.github.io/main.py", line 1, in <module>
    import openai

import openai where on cloud?

You check help me

  1. You need a requirements.txt file in your repo.
  2. Don’t push your credentials on github
 :grimacing:
1 Like

at now, streamlit waserror, not deploy app, you check problem

  1. Try to reboot or re-deploy your app, currently there seems to issues with the streamlit cloud infrastructure.
  2. Don’t put the credentials in the config.py file, use st.secrets for this.

I deploy app ok on online via strealit cloud, app on local ok but when run app was build on Streamlit cloud was error:

openai.error.AuthenticationError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).

File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)File "/app/hoptai.github.io/main.py", line 26, in <module>
    st.text_area("GPTAI", value=generate_response(user_input), height=600, max_chars=None)File "/app/hoptai.github.io/main.py", line 8, in generate_response
    completion = openai.Completion.create(engine="text-davinci-003",File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/completion.py", line 25, in create
    return super().create(*args, **kwargs)File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
    response, _, api_key = requestor.request(File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 226, in request
    resp, got_stream = self._interpret_response(result, stream)File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 619, in _interpret_response
    self._interpret_response_line(File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 679, in _interpret_response_line
    raise self.handle_error_response(

I was delete app and build again but eror

You can help me. Tks you

I build on python 3.19.13 on ok when run local, but not ok when streamlit cloud

This is not related to streamlit.
Your probably provided the wrong credentials.

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