Installer returned a non-zero exit code with first app

Hi. I am new here and have build my first app. trying to deploy it but get this error. My requirements file looks like this:

absl-py==1.1.0
altair==4.2.0
altgraph==0.17.2
anyio==3.6.1
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.0.5
astunparse==1.6.3
attrs==21.4.0
Babel==2.10.3
backcall==0.2.0
beautifulsoup4==4.11.1
bleach==5.0.1
blinker==1.4
cachetools==5.2.0
certifi==2022.6.15
cffi==1.15.0
charset-normalizer==2.0.12
click==8.1.3
colorama==0.4.5
commonmark==0.9.1
cycler==0.11.0
debugpy==1.6.0
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.4
entrypoints==0.4
executing==0.8.3
fastjsonschema==2.15.3
filelock==3.7.1
flatbuffers==1.12
fonttools==4.33.3
future==0.18.2
gast==0.4.0
gitdb==4.0.9
GitPython==3.1.27
google-auth==2.8.0
google-auth-oauthlib==0.4.6
google-pasta==0.2.0
grpcio==1.47.0
h5py==3.7.0
idna==3.3
importlib-metadata==4.12.0
imutils==0.5.4
ipykernel==6.15.0
ipython==8.4.0
ipython-genutils==0.2.0
ipywidgets==7.7.1
jedi==0.18.1
Jinja2==3.1.2
json5==0.9.8
jsonschema==4.6.0
jupyter-client==7.3.4
jupyter-core==4.10.0
jupyter-server==1.18.0
jupyterlab==3.4.3
jupyterlab-pygments==0.2.2
jupyterlab-server==2.14.0
jupyterlab-widgets==1.1.1
keras==2.9.0
Keras-Preprocessing==1.1.2
keyboard==0.13.5
kiwisolver==1.4.3
libclang==14.0.1
lxml==4.9.1
Markdown==3.3.7
MarkupSafe==2.1.1
matplotlib==3.5.2
matplotlib-inline==0.1.3
mistune==0.8.4
mss==6.1.0
multitasking==0.0.11
nbclassic==0.3.7
nbclient==0.6.4
nbconvert==6.5.0
nbformat==5.4.0
nest-asyncio==1.5.5
notebook==6.4.12
notebook-shim==0.1.0
numpy==1.22.4
oauthlib==3.2.0
opencv-contrib-python==4.6.0.66
opencv-python==4.6.0.66
opt-einsum==3.3.0
packaging==21.3
pandas==1.4.2
pandocfilters==1.5.0
parso==0.8.3
pbr==5.9.0
pefile==2022.5.30
pickleshare==0.7.5
Pillow==9.1.1
platformdirs==2.5.2
prometheus-client==0.14.1
prompt-toolkit==3.0.30
protobuf==3.19.4
psutil==5.9.1
pure-eval==0.2.2
pyarrow==8.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pydeck==0.7.1
Pygments==2.12.0
pyinstaller==5.1
pyinstaller-hooks-contrib==2022.7
Pympler==1.0.1
pyparsing==3.0.9
pyrsistent==0.18.1
python-dateutil==2.8.2
pytz==2022.1
pytz-deprecation-shim==0.1.0.post0
pypiwin32==304
pywin32-ctypes==0.2.0
pywinpty==2.0.5
pyzmq==23.2.0
requests==2.28.0
requests-oauthlib==1.3.1
rich==12.4.4
rsa==4.8
semver==2.13.0
Send2Trash==1.8.0
six==1.16.0
smmap==5.0.0
sniffio==1.2.0
soupsieve==2.3.2.post1
stack-data==0.3.0
stevedore==3.5.0
streamlit==1.10.0
tensorboard==2.9.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.9.1
tensorflow-estimator==2.9.0
tensorflow-io-gcs-filesystem==0.26.0
termcolor==1.1.0
terminado==0.15.0
tf-estimator-nightly==2.8.0.dev2021122109
tinycss2==1.1.1
toml==0.10.2
toolz==0.11.2
tornado==6.1
traitlets==5.3.0
typing_extensions==4.2.0
tzdata==2022.1
tzlocal==4.2
urllib3==1.26.9
validators==0.20.0
virtualenv==20.15.0
virtualenv-clone==0.5.7
virtualenvwrapper==4.8.4
watchdog==2.1.9
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.3.3
Werkzeug==2.1.2
widgetsnbextension==3.6.1
wrapt==1.14.1
yfinance==0.1.72
zipp==3.8.0

any help will be appreciated

:wave: Hi, @Louwrens_Ferreira! Can you please share your Github repo link associated with the above app?

https://github.com/Wapper85/InvestmentCalculator.git

Thanks @Louwrens_Ferreira for sharing your repo link! :blush:

  • Please make the following changes inside your repo โ€”>
    1. Add the relevant packages inside the requirements.txt file :

       matplotlib==3.5.2
       streamlit==1.10.0
       pandas==1.4.2
       Pillow==9.1.1
       numpy==1.22.4
      
    2. Inside myfirstapp.py file, remove line no.3 , as it imports matplotlib library for 2nd time.

      check

    3. Add a README.md file, cause without this your App wonโ€™t be deployed.

Hope this helps!
Thanks! :slightly_smiling_face:

1 Like

what should the readme file contain. cause its still niot working, not getting any errors

[13:19:11] โ—๏ธ installer returned a non-zero exit code
[13:19:37] ๐Ÿ™ Pulling code changes from Github...
[13:19:38] โ—๏ธ The main module file does not exist: /app/investmentcalculator/myfirstapp.py
[13:19:51] ๐Ÿ™ Pulling code changes from Github...
[13:19:51] ๐Ÿ“ฆ Processing dependencies...
[13:19:51] ๐Ÿ“ฆ Processed dependencies!
[13:19:54] ๐Ÿ”„ Updated app!
[13:21:28] ๐Ÿ™ Pulling code changes from Github...
[13:21:29] ๐Ÿ“ฆ Processing dependencies...
[13:21:29] ๐Ÿ“ฆ Processed dependencies!
[13:21:32] ๐Ÿ”„ Updated app!
[13:22:21] ๐Ÿ™ Pulling code changes from Github...
[13:22:22] โ—๏ธ The main module file does not exist: /app/investmentcalculator/myfirstapp.py
[13:22:41] ๐Ÿ™ Pulling code changes from Github...
[13:22:42] ๐Ÿ“ฆ Processing dependencies...
[13:22:42] ๐Ÿ“ฆ Processed dependencies!
[13:22:44] ๐Ÿ”„ Updated app!
[13:24:04] ๐Ÿ™ Pulling code changes from Github...
[13:24:05] ๐Ÿ“ฆ Processing dependencies...
[13:24:05] ๐Ÿ“ฆ Processed dependencies!
[13:24:07] ๐Ÿ”„ Updated app!

You can keep it Blank for now. Later add how to use the app, packages used, etcโ€ฆ
Please remove all the packages from requirements.txt file & just add the ones I have mentioned above.

Remove numpy==1.22.4 from requirements.txt file as you have updated your code in myfirstapp.py file! :sweat_smile:

Hey @Louwrens_Ferreira , is it still causing errors?

not getting errors just keeps saying your app is in the oven

and how do you generate the requirements file with correct versions of the packages? I used a command line script to generate the one I had that was obviously wrong

You can either scroll the whole requirements.txt file for finding the packages youโ€™ve used or else find the version numbers for each package manually by typing the package name long with --version, and you have them!

thanks so much its workingโ€ฆ!!

1 Like

Nice to hear that! :slightly_smiling_face: Happy Streamlit-ing! :balloon:

@ShruAgarwal
Hi, I hope you donโ€™t mind me jumping on this as I think I am experiencing a similar issue and hoped you could help me!

I am also trying to deploy my first app: GitHub - sinfulnina/my_first_project

I have tried to your instructions where relevant for my project, but it also just keeps saying โ€˜your app is in the ovenโ€™. Any ideas much appreciated!?

[13:01:40] ๐Ÿ Python dependencies were installed from /app/my_first_project/requirements.txt using pip.
[13:01:40] ๐Ÿ“ฆ Processed dependencies!
  Stopping...
[13:01:44] ๐Ÿ”„ Updated app!

Hey, @NinaVistisen. Thanks for reaching out to me :blush:. Nice to see that youโ€™ve already tried the steps above.

Well, Iโ€™ve observed that you have imported components API, but have commented all of the code from line no. 57 to 71 in st_app.py file.

I would suggest to remove the commented code.
Also, does the app requires a secret key? :thinking:
If yes, then I would suggest to refer docs & use Streamlit secrets.

Let me know if trying the above changes helped you deploy the app.

Thanks! :slightly_smiling_face:

Hey, thanks for looking into this for me so quickly! Appreciate it.

Iโ€™ve tried removing commented out components code to begin with. The message for a while has been:

[07:10:02] ๐Ÿ™ Pulling code changes from Github...
[07:10:03] ๐Ÿ“ฆ Processing dependencies...
[07:10:03] ๐Ÿ“ฆ Processed dependencies!
[07:10:06] ๐Ÿ”„ Updated app!

Maybe I just need to be a bit more patient?

And to answer your other question, the app does need an API Key which is currently stored as an environment variable. This is in line 8 of st_app.py. Will have a look at the Streamlit Secrets you mentioned and see if that can help!

Hi Again,

I have now added the API Key via Settings - Secret. Then I have tried to change line 7 (was line 8 until i removed the import components), but Iโ€™m unsure if I have done this correctly? Have tried a few different ways but just keeps saying Updated App!

openai.api_key = os.getenv(โ€œOPENAI_API_KEYโ€) == st.secrets[โ€œOPENAI_API_KEYโ€]

Hi @NinaVistisen,

For this Line 7, can you delete os.getenv("OPENAI_API_KEY") == from:

openai.api_key = os.getenv("OPENAI_API_KEY") == st.secrets["OPENAI_API_KEY"]

so that it becomes:

openai.api_key = st.secrets["OPENAI_API_KEY"]

Hi @dataprofessor,

Thanks for the help, really appreciate the help.

I updated the code quite a few hours ago, but am still getting the โ€˜Your app is in the ovenโ€™:

[20:08:17] ๐Ÿ™ Pulling code changes from Github...
[20:08:18] ๐Ÿ“ฆ Processing dependencies...
[20:08:18] ๐Ÿ“ฆ Processed dependencies!
[20:08:19] ๐Ÿ”„ Updated app!
1 Like

Hi @NinaVistisen

I skimmed through you code and I noticed that you forgot to provide a closing tag for which was opened on line 57. Could you try again.