Streamlit Cloud deploy is failing with error "does not contain any element"

Hey, I am trying to deploy a small Streamlit dashboard using Streamlit Cloud, but I am stuck on an issue, unsure how to debug it.

The deployment fails with an error “does not contain any element”.

Here are the logs from the deployment:


[     UTC     ] Logs for geyserfund-geyser-streamlit-dashboard-app-5sy0to.streamlitapp.com/
────────────────────────────────────────────────────────────────────────────────────────
[20:41:55] 🖥 Provisioning machine...
[20:42:01] 🎛 Preparing system...
[20:41:55] 🚀 Starting up repository: 'geyser-streamlit-dashboard', branch: 'main', main module: 'app.py'
[20:41:55] 🐙 Cloning repository...
[20:41:57] 🐙 Cloning into '/app/geyser-streamlit-dashboard'...

[20:41:57] 🐙 Cloned repository!
[20:41:57] 🐙 Pulling code changes from Github...
[20:41:58] 📦 Processing dependencies...
[20:41:58] 📦 Apt dependencies were installed from /app/geyser-streamlit-dashboard/packages.txt using apt-get.
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [59.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:4 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:5 https://packages.microsoft.com/debian/10/prod buster InRelease [29.8 kB]
Get:6 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [187 kB]
Get:7 http://deb.debian.org/debian bullseye-updates/main amd64 Packages.diff/Index [11.7 kB]
Get:8 https://packages.microsoft.com/debian/10/prod buster/main amd64 Packages [195 kB]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2022-10-02-2032.44-F-2022-10-02-2032.44.pdiff [286 B]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2022-10-02-2032.44-F-2022-10-02-2032.44.pdiff [286 B]
Fetched 576 kB in 1s (775 kB/s)
Reading package lists...[2022-10-04 20:41:59.612537] 
Reading package lists...[2022-10-04 20:42:00.219257] 
Building dependency tree...[2022-10-04 20:42:00.425152] 
Reading state information...[2022-10-04 20:42:00.433706] 
The following additional packages will be installed:
  libpq5
Suggested packages:
  postgresql-doc-13
The following NEW packages will be installed:
  libpq-dev libpq5
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 318 kB of archives.
After this operation, 1372 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 libpq5 amd64 13.8-0+deb11u1 [180 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libpq-dev amd64 13.8-0+deb11u1 [139 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 318 kB in 0s (5222 kB/s)
Selecting previously unselected package libpq5:amd64.
(Reading database ... 
[2022-10-04 20:42:00.968804] (Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
[2022-10-04 20:42:00.972203] (Reading database ... 65%
[2022-10-04 20:42:00.975403] (Reading database ... 70%
[2022-10-04 20:42:00.975813] (Reading database ... 75%
[2022-10-04 20:42:00.976470] (Reading database ... 80%
[2022-10-04 20:42:00.976882] (Reading database ... 85%
[2022-10-04 20:42:00.978315] (Reading database ... 90%
[2022-10-04 20:42:00.978820] (Reading database ... 95%
[2022-10-04 20:42:00.979720] (Reading database ... 100%
(Reading database ... 21875 files and directories currently installed.)
Preparing to unpack .../libpq5_13.8-0+deb11u1_amd64.deb ...
Unpacking libpq5:amd64 (13.8-0+deb11u1) ...
Selecting previously unselected package libpq-dev.
Preparing to unpack .../libpq-dev_13.8-0+deb11u1_amd64.deb ...
Unpacking libpq-dev (13.8-0+deb11u1) ...
Setting up libpq5:amd64 (13.8-0+deb11u1) ...
Setting up libpq-dev (13.8-0+deb11u1) ...
Processing triggers for libc-bin (2.31-13+deb11u4) ...

─────────────────────────────────────── poetry ─────────────────────────────────────────

/app/geyser-streamlit-dashboard /app/geyser-streamlit-dashboard
Installing dependencies from lock file

Package operations: 54 installs, 0 updates, 0 removals

  • Installing six (1.16.0)
  • Installing zipp (3.8.1)
  • Installing attrs (22.1.0)
  • Installing backports-zoneinfo (0.2.1)
  • Installing markupsafe (2.1.1)
  • Installing importlib-resources (5.9.0)
  • Installing pkgutil-resolve-name (1.3.10)
  • Installing numpy (1.23.3)
  • Installing pyrsistent (0.18.1)
  • Installing python-dateutil (2.8.2)
  • Installing pytz (2022.4)
  • Installing smmap (5.0.0)
  • Installing tzdata (2022.4)
[20:42:05] ⛓ Spinning up manager process...
  • Installing certifi (2022.9.24)
  • Installing charset-normalizer (2.1.1)
  • Installing commonmark (0.9.1)
  • Installing entrypoints (0.4)
  • Installing idna (3.4)
  • Installing jinja2 (3.1.2)
  • Installing gitdb (4.0.9)
  • Installing pandas (1.5.0)
  • Installing pyparsing (3.0.9)
  • Installing pytz-deprecation-shim (0.1.0.post0)
  • Installing pygments (2.13.0)
  • Installing decorator (5.1.1)
  • Installing jsonschema (4.16.0)
  • Installing typing-extensions (4.3.0)
  • Installing toolz (0.12.0)
  • Installing urllib3 (1.26.12)
  • Installing altair (4.2.0)
  • Installing blinker (1.5)
  • Installing cachetools (5.2.0)
  • Installing click (8.1.3)
  • Installing importlib-metadata (5.0.0)
  • Installing gitpython (3.1.27)
  • Installing protobuf (3.20.3)
  • Installing pyarrow (9.0.0)
  • Installing pillow (9.2.0)
  • Installing pympler (1.0.1)
  • Installing packaging (21.3)
  • Installing pydeck (0.8.0b3)
  • Installing semver (2.13.0)
  • Installing pyyaml (6.0)
  • Installing tornado (6.2)
  • Installing validators (0.20.0)
  • Installing toml (0.10.2)
  • Installing tzlocal (4.2)
  • Installing requests (2.28.1)
  • Installing rich (12.6.0)
  • Installing watchdog (2.1.9)
  • Installing bokeh (2.4.3)
  • Installing psycopg2 (2.9.3)
  • Installing psycopg2-binary (2.9.3)
  • Installing streamlit (1.13.0)

/app/geyser-streamlit-dashboard/geyser_streamlit_dashboard does not contain any element
/app/geyser-streamlit-dashboard

────────────────────────────────────────────────────────────────────────────────────────

[20:42:34] ❗️ installer returned a non-zero exit code
[20:42:34] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[20:44:05] ❗️ Streamlit server consistently failed status checks
[20:44:05] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.
[20:41:55] 🚀 Starting up repository: 'geyser-streamlit-dashboard', branch: 'main', main module: 'app.py'
[20:41:55] 🐙 Cloning repository...
[20:41:57] 🐙 Cloning into '/app/geyser-streamlit-dashboard'...

[20:41:57] 🐙 Cloned repository!
[20:41:57] 🐙 Pulling code changes from Github...
[20:41:58] 📦 Processing dependencies...
[20:41:58] 📦 Apt dependencies were installed from /app/geyser-streamlit-dashboard/packages.txt using apt-get.
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [59.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:4 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:5 https://packages.microsoft.com/debian/10/prod buster InRelease [29.8 kB]
Get:6 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [187 kB]
Get:7 http://deb.debian.org/debian bullseye-updates/main amd64 Packages.diff/Index [11.7 kB]
Get:8 https://packages.microsoft.com/debian/10/prod buster/main amd64 Packages [195 kB]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2022-10-02-2032.44-F-2022-10-02-2032.44.pdiff [286 B]
Get:9 http://deb.debian.org/debian bullseye-updates/main amd64 Packages T-2022-10-02-2032.44-F-2022-10-02-2032.44.pdiff [286 B]
Fetched 576 kB in 1s (775 kB/s)
Reading package lists...[2022-10-04 20:41:59.612537] 
Reading package lists...[2022-10-04 20:42:00.219257] 
Building dependency tree...[2022-10-04 20:42:00.425152] 
Reading state information...[2022-10-04 20:42:00.433706] 
The following additional packages will be installed:
  libpq5
Suggested packages:
  postgresql-doc-13
The following NEW packages will be installed:
  libpq-dev libpq5
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 318 kB of archives.
After this operation, 1372 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 libpq5 amd64 13.8-0+deb11u1 [180 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 libpq-dev amd64 13.8-0+deb11u1 [139 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 318 kB in 0s (5222 kB/s)
Selecting previously unselected package libpq5:amd64.
(Reading database ... 
[2022-10-04 20:42:00.968804] (Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
[2022-10-04 20:42:00.972203] (Reading database ... 65%
[2022-10-04 20:42:00.975403] (Reading database ... 70%
[2022-10-04 20:42:00.975813] (Reading database ... 75%
[2022-10-04 20:42:00.976470] (Reading database ... 80%
[2022-10-04 20:42:00.976882] (Reading database ... 85%
[2022-10-04 20:42:00.978315] (Reading database ... 90%
[2022-10-04 20:42:00.978820] (Reading database ... 95%
[2022-10-04 20:42:00.979720] (Reading database ... 100%
(Reading database ... 21875 files and directories currently installed.)
Preparing to unpack .../libpq5_13.8-0+deb11u1_amd64.deb ...
Unpacking libpq5:amd64 (13.8-0+deb11u1) ...
Selecting previously unselected package libpq-dev.
Preparing to unpack .../libpq-dev_13.8-0+deb11u1_amd64.deb ...
Unpacking libpq-dev (13.8-0+deb11u1) ...
Setting up libpq5:amd64 (13.8-0+deb11u1) ...
Setting up libpq-dev (13.8-0+deb11u1) ...
Processing triggers for libc-bin (2.31-13+deb11u4) ...

─────────────────────────────────────── poetry ─────────────────────────────────────────

/app/geyser-streamlit-dashboard /app/geyser-streamlit-dashboard
Installing dependencies from lock file

Package operations: 54 installs, 0 updates, 0 removals

  • Installing six (1.16.0)
  • Installing zipp (3.8.1)
  • Installing attrs (22.1.0)
  • Installing backports-zoneinfo (0.2.1)
  • Installing markupsafe (2.1.1)
  • Installing importlib-resources (5.9.0)
  • Installing pkgutil-resolve-name (1.3.10)
  • Installing numpy (1.23.3)
  • Installing pyrsistent (0.18.1)
  • Installing python-dateutil (2.8.2)
  • Installing pytz (2022.4)
  • Installing smmap (5.0.0)
  • Installing tzdata (2022.4)
  • Installing certifi (2022.9.24)
  • Installing charset-normalizer (2.1.1)
  • Installing commonmark (0.9.1)
  • Installing entrypoints (0.4)
  • Installing idna (3.4)
  • Installing jinja2 (3.1.2)
  • Installing gitdb (4.0.9)
  • Installing pandas (1.5.0)
  • Installing pyparsing (3.0.9)
  • Installing pytz-deprecation-shim (0.1.0.post0)
  • Installing pygments (2.13.0)
  • Installing decorator (5.1.1)
  • Installing jsonschema (4.16.0)
  • Installing typing-extensions (4.3.0)
  • Installing toolz (0.12.0)
  • Installing urllib3 (1.26.12)
  • Installing altair (4.2.0)
  • Installing blinker (1.5)
  • Installing cachetools (5.2.0)
  • Installing click (8.1.3)
  • Installing importlib-metadata (5.0.0)
  • Installing gitpython (3.1.27)
  • Installing protobuf (3.20.3)
  • Installing pyarrow (9.0.0)
  • Installing pillow (9.2.0)
  • Installing pympler (1.0.1)
  • Installing packaging (21.3)
  • Installing pydeck (0.8.0b3)
  • Installing semver (2.13.0)
  • Installing pyyaml (6.0)
  • Installing tornado (6.2)
  • Installing validators (0.20.0)
  • Installing toml (0.10.2)
  • Installing tzlocal (4.2)
  • Installing requests (2.28.1)
  • Installing rich (12.6.0)
  • Installing watchdog (2.1.9)
  • Installing bokeh (2.4.3)
  • Installing psycopg2 (2.9.3)
  • Installing psycopg2-binary (2.9.3)
  • Installing streamlit (1.13.0)

/app/geyser-streamlit-dashboard/geyser_streamlit_dashboard does not contain any element
/app/geyser-streamlit-dashboard

────────────────────────────────────────────────────────────────────────────────────────

[20:42:34] ❗️ installer returned a non-zero exit code
[20:42:34] ❗️ Error during processing dependencies! Please fix the error and push an update, or try restarting the app.
[20:44:05] ❗️ Streamlit server consistently failed status checks
[20:44:05] ❗️ Please fix the errors, push an update to the git repo, or reboot the app.

I would appreciate any help to proceed from here!

Hi @steliosrammos,

Can you share your requirements file?

Caroline

Hi Caroline, thank you for your response and of course!

I use poetry’s pyproject.toml with the following contents:

[tool.poetry]
name = "geyser-streamlit-dashboard"
version = "0.1.0"
description = "Geyser Streamlit Analytics Dashboard"
authors = ["Stelios Rammos <stelio.rammos@gmail.com>"]
readme = "README.md"
packages = [{include = "geyser_streamlit_dashboard"}]

[tool.poetry.dependencies]
python = "3.8.14"
streamlit = "^1.12.2"
watchdog = "^2.1.9"
pandas = "^1.4.4"
psycopg2 = "^2.9.3"
psycopg2-binary = "^2.9.3"
bokeh = "^2.4.3"
altair = "^4.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

In addition, I have configured a packages.txt as follows:

libpq-dev

Finally the (most relevant) project structure is as follows:

geyser-streamlit-dashboard
├── app.py
├── charts.py
├── pyproject.toml
├── packages.txt
└── .streamlit
    └── secrets.toml

Hope this helps.

Hi @steliosrammos,

This looks like an issue with Poetry. Unfortunately I’m not a Poetry expert, but I suspect that if you switch to a requirements.txt file, the issue will go away. If you want to stick with Poetry, this thread seems to be covering a similar issue.

Caroline