Ubuntu remote server tornado.websocket.WebSocketClosedError

@Quoc_Tran @randyzwitch possibly you have some experience with this?

I purchased the DigitalOcean Droplet (remote server) 2GB/25GB Disk with Ubuntu. I installed the most recent version of Anaconda and Streamlit. I don’t have the firewall turned on. I updated to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-54-generic x86_64).

When I run my app the page shows but does not work. In my terminal I get the following error message:

Traceback (most recent call last): File “/root/anaconda3/lib/python3.8/site-packages/tornado/websocket.py”, line 1106, in wrapper raise WebSocketClosedError()tornado.websocket.WebSocketClosedError

I thought it might be that I need to change the port to 8501 and I tried following the guide here however, it didn’t work.

I tried following the guide here:

When I run streamlit hello, I get the same error.

Any ideas on how I can get the app to work?

I suspect the app takes longer time to finish the run than the waiting time of the websocket.

@randyzwitch are you able to assist?

I ended up using AWS ec2 guide and got the same error.

I found your github not-loading post and streamlit run my_app.py --server.enableWebsocketCompression=false worked.

How do I find which part of your infrastructure is stripping the Sec-WebSocket-Extensions HTTP header and change that behavior?

Unfortunately, I don’t have that level of experience with DigitalOcean to know what part of their service is stripping headers.

Thanks for the response.

I ended up using AWS ec2 but I had the same problem on both. I did follow the guidance here to add Google Analytics, where I placed GA code after the header on the index file on my local machine.

I don’t think that is the source of the problem because I installed streamlit on Ubuntu remote server using miniconda and did not edit the index file on that server. When I run it locally there are no problems.

Do you think that could be causing the problem?

I’d try to limit the surface area of changes first. To solve this problem, you’re swapping hosts and modifying core files…maybe just stick with a single host, take out the Google Analytics mods and make sure you can deploy your app. Then from there, work on adding analytics in.

I do suspect your modification of the source files to add scripts is doing something, as people deploy on DigitalOcean and EC2 all the time without needing to disable compression.

1 Like

Hi @randyzwitch

I deleted everything and started from scratch (many times). I was successful configuring Nginx on a virtual server to resolve the port 8501 problem. However, I have the same issue - websocket error on virtual server but not on Heroku or local. I did not change any core files or add Google Analytics.

Any thoughts on why this is happening? It must of happen to others since you wrote a post about it?

Hi @chefnewman

I’m trying to repro on my end, but it all works just fine. Can you see if the same steps work for you?

Here’s what I did:

  1. Went to Digital Ocean and created a new Ubuntu Droplet. Here’s what the droplet looks like:
  2. Opened the terminal for the Droplet and ran the following commands:
    apt update
    apt install pip3
    pip3 install streamlit
    streamlit hello
    
  3. Opened a browser at [ip address]:8501 and saw the Streamlit Hello app running.
    I didn’t have to open a port or anything. Everything just worked.

Hi @thiago

I am using AWS but I will try it with a new instance. Which version of Ubuntu did you use?

18.04

I just clicked on the default option for everything :laughing:

@thiago

I followed all your steps although I had to use sudo to get them to work. When I tried the last command it couldn’t find streamlit?

Screen Shot 2020-12-21 at 5.57.54 PM

Looks like the command above streamlit hello led to a segmentation fault. So pip3 install streamlit didn’t work.

Can you post more of the error message here?

Collecting streamlit
  Using cached https://files.pythonhosted.org/packages/87/e9/38e2870d8b9cd6dfd631577443cc55c2407ec8bfdcac4a3e234516bae69e/streamlit-0.73.0-py2.py3-none-any.whl
Collecting gitpython (from streamlit)
  Using cached https://files.pythonhosted.org/packages/24/d1/a7f8fe3df258549b303415157328bfcc63e9b11d06a7ad7a3327f3d32606/GitPython-3.1.11-py3-none-any.whl
Collecting tzlocal (from streamlit)
  Using cached https://files.pythonhosted.org/packages/5d/94/d47b0fd5988e6b7059de05720a646a2930920fff247a826f61674d436ba4/tzlocal-2.1-py2.py3-none-any.whl
Collecting cachetools>=4.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/92/da/d3c94fc7c72ad9298072681ec3e8cea86949acc5c4cce4290ba21f7050a8/cachetools-4.2.0-py3-none-any.whl
Collecting pillow>=6.2.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/5f/19/d4c25111d36163698396f93c363114cf1cddbacb24744f6612f25b6aa3d0/Pillow-8.0.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting pydeck>=0.1.dev5 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/9e/9d/8fbf1f56cc5891e6c3295bf94fc176e9ab0a3ffdd090cc8b354ac2640f9a/pydeck-0.5.0-py2.py3-none-any.whl
Collecting click>=7.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
Collecting astor (from streamlit)
  Using cached https://files.pythonhosted.org/packages/c3/88/97eef84f48fa04fbd6750e62dcceafba6c63c81b7ac1420856c8dcc0a3f9/astor-0.8.1-py2.py3-none-any.whl
Collecting numpy (from streamlit)
  Using cached https://files.pythonhosted.org/packages/a6/fc/36e52d0ae2aa502b211f1bcd2fdeec72d343d58224eabcdddc1bcb052db1/numpy-1.19.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting blinker (from streamlit)
Collecting altair>=3.2.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/01/55/0bb2226e34f21fa549c3f4557b4f154a5632f61132a969da17c95ca8eab9/altair-4.1.0-py3-none-any.whl
Collecting requests (from streamlit)
  Using cached https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl
Collecting base58 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/3c/03/58572025c77b9e6027155b272a1b96298e711cd4f95c24967f7137ab0c4b/base58-2.0.1-py3-none-any.whl
Collecting python-dateutil (from streamlit)
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting protobuf!=3.11,>=3.6.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/fe/fd/247ef25f5ec5f9acecfbc98ca3c6aaf66716cf52509aca9a93583d410493/protobuf-3.14.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting toml (from streamlit)
  Using cached https://files.pythonhosted.org/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl
Collecting packaging (from streamlit)
  Using cached https://files.pythonhosted.org/packages/b1/a7/588bfa063e7763247ab6f7e1d994e331b85e0e7d09f853c59a6eb9696974/packaging-20.8-py2.py3-none-any.whl
Collecting watchdog (from streamlit)
Collecting validators (from streamlit)
  Using cached https://files.pythonhosted.org/packages/db/2f/7fed3ee94ad665ad2c1de87f858f10a7785251ff75b4fd47987888d07ef1/validators-0.18.2-py3-none-any.whl
Collecting pyarrow; python_version < "3.9" (from streamlit)
  Using cached https://files.pythonhosted.org/packages/f9/a0/f2941d8274435f403698aee63da0d171552a9acb348d37c7e7ff25f1ae1f/pyarrow-2.0.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pandas>=0.21.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/c3/e2/00cacecafbab071c787019f00ad84ca3185952f6bb9bca9550ed83870d4d/pandas-1.1.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting tornado>=5.0 (from streamlit)
  Using cached https://files.pythonhosted.org/packages/01/d1/8750ad20cbcefb499bb8b405e243f83c2c89f78d139e6f8c8d800640f554/tornado-6.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting gitdb<5,>=4.0.1 (from gitpython->streamlit)
  Using cached https://files.pythonhosted.org/packages/48/11/d1800bca0a3bae820b84b7d813ad1eff15a48a64caea9c823fc8c1b119e8/gitdb-4.0.5-py3-none-any.whl
Collecting pytz (from tzlocal->streamlit)
  Using cached https://files.pythonhosted.org/packages/12/f8/ff09af6ff61a3efaad5f61ba5facdf17e7722c4393f7d8a66674d2dbd29f/pytz-2020.4-py2.py3-none-any.whl
Collecting traitlets>=4.3.2 (from pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/ca/ab/872a23e29cec3cf2594af7e857f18b687ad21039c1f9b922fac5b9b142d5/traitlets-4.3.3-py2.py3-none-any.whl
Collecting ipywidgets>=7.0.0 (from pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/56/a0/dbcf5881bb2f51e8db678211907f16ea0a182b232c591a6d6f276985ca95/ipywidgets-7.5.1-py2.py3-none-any.whl
Collecting jinja2>=2.10.1 (from pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
Collecting ipykernel>=5.1.2; python_version >= "3.4" (from pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/56/c5/97a972202414c79c28814b1450a31a89777638fb3524e8b5b686a5436abe/ipykernel-5.4.2-py3-none-any.whl
Collecting entrypoints (from altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/ac/c6/44694103f8c221443ee6b0041f69e2740d89a25641e62fb4f2ee568f2f9c/entrypoints-0.3-py2.py3-none-any.whl
Collecting toolz (from altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/12/f5/537e55f8ba664ff2a26f26913010fb0fcb98b6bbadc6158af888184fd0b7/toolz-0.11.1-py3-none-any.whl
Collecting jsonschema (from altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl
Collecting chardet<5,>=3.0.2 (from requests->streamlit)
  Using cached https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl
Collecting urllib3<1.27,>=1.21.1 (from requests->streamlit)
  Using cached https://files.pythonhosted.org/packages/f5/71/45d36a8df68f3ebb098d6861b2c017f3d094538c0fb98fa61d4dc43e69b9/urllib3-1.26.2-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->streamlit)
  Using cached https://files.pythonhosted.org/packages/5e/a0/5f06e1e1d463903cf0c0eebeb751791119ed7a4b3737fdc9a77f1cdfb51f/certifi-2020.12.5-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests->streamlit)
  Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil->streamlit)
  Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2 (from packaging->streamlit)
  Using cached https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl
Collecting decorator>=3.4.0 (from validators->streamlit)
  Using cached https://files.pythonhosted.org/packages/ed/1b/72a1821152d07cf1d8b6fce298aeb06a7eb90f4d6d41acec9861e7cc6df0/decorator-4.4.2-py2.py3-none-any.whl
Collecting smmap<4,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython->streamlit)
  Using cached https://files.pythonhosted.org/packages/b0/9a/4d409a6234eb940e6a78dfdfc66156e7522262f5f2fecca07dc55915952d/smmap-3.0.4-py2.py3-none-any.whl
Collecting ipython-genutils (from traitlets>=4.3.2->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/fa/bc/9bd3b5c2b4774d5f33b2d544f1460be9df7df2fe42f352135381c347c69a/ipython_genutils-0.2.0-py2.py3-none-any.whl
Collecting widgetsnbextension~=3.5.0 (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/6c/7b/7ac231c20d2d33c445eaacf8a433f4e22c60677eb9776c7c5262d7ddee2d/widgetsnbextension-3.5.1-py2.py3-none-any.whl
Collecting ipython>=4.0.0; python_version >= "3.3" (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/23/6a/210816c943c9aeeb29e4e18a298f14bf0e118fe222a23e13bfcc2d41b0a4/ipython-7.16.1-py3-none-any.whl
Collecting nbformat>=4.2.0 (from ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/40/f7/b9a7c82aff85b706f2824c97727b8e2106bb992bd553e93082b9c6dd45fe/nbformat-5.0.8-py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2>=2.10.1->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting jupyter-client (from ipykernel>=5.1.2; python_version >= "3.4"->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/dc/41/9fa443d5ae8907dd8f7d12146cb0092dc053afd67b5b57e7e8786a328547/jupyter_client-6.1.7-py3-none-any.whl
Collecting attrs>=17.4.0 (from jsonschema->altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/c3/aa/cb45262569fcc047bf070b5de61813724d6726db83259222cd7b4c79821a/attrs-20.3.0-py2.py3-none-any.whl
Collecting pyrsistent>=0.14.0 (from jsonschema->altair>=3.2.0->streamlit)
Collecting importlib-metadata; python_version < "3.8" (from jsonschema->altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/7a/85/ac225e35048e050a6351b6f1251cdb2b6060092f2c6840aff1d6319941b1/importlib_metadata-3.3.0-py3-none-any.whl
Collecting setuptools (from jsonschema->altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/6e/77/e921ae5c370698762cf645797f42e6d4d7e679f705a8a9697234591808aa/setuptools-51.1.0.post20201221-py3-none-any.whl
Collecting notebook>=4.4.1 (from widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/81/e3/f92ab5688f53dc58dd2cc1b330828024527bb4e8d29bf980a096909b66e5/notebook-6.1.5-py3-none-any.whl
Collecting pexpect; sys_platform != "win32" (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/39/7b/88dbb785881c28a102619d46423cb853b46dbccc70d3ac362d99773a78ce/pexpect-4.8.0-py2.py3-none-any.whl
Collecting pickleshare (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/9a/41/220f49aaea88bc6fa6cba8d05ecf24676326156c23b991e80b3f2fc24c77/pickleshare-0.7.5-py2.py3-none-any.whl
Collecting pygments (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/85/c5/c437c383d5917fae9782eb6588bec8aff931afe13c76b9e8c03dacee9beb/Pygments-2.7.3-py3-none-any.whl
Collecting backcall (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/4c/1c/ff6546b6c12603d8dd1070aa3c3d273ad4c07f5771689a7b69a550e8c951/backcall-0.2.0-py2.py3-none-any.whl
Collecting jedi>=0.10 (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/c3/d4/36136b18daae06ad798966735f6c3fb96869c1be9f8245d2a8f556e40c36/jedi-0.17.2-py2.py3-none-any.whl
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 (from ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/8a/aa/198e6a857e83ea8b711a6ae0c37717c0eb1b23ff52e3732a644fcd389cb3/prompt_toolkit-3.0.8-py3-none-any.whl
Collecting jupyter-core (from nbformat>=4.2.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/f4/34/ba811d7e4b5374e70fc3801d932966979e252e5c1a99eddb32ce63ec54e6/jupyter_core-4.7.0-py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->ipykernel>=5.1.2; python_version >= "3.4"->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/05/87/bfed82301b9e9f847f48a14722a61aa1d6249d98e00e6825dd9b7e70abe4/pyzmq-20.0.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting typing-extensions>=3.6.4; python_version < "3.8" (from importlib-metadata; python_version < "3.8"->jsonschema->altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl
Collecting zipp>=0.5 (from importlib-metadata; python_version < "3.8"->jsonschema->altair>=3.2.0->streamlit)
  Using cached https://files.pythonhosted.org/packages/41/ad/6a4f1a124b325618a7fb758b885b68ff7b058eec47d9220a12ab38d90b1f/zipp-3.4.0-py3-none-any.whl
Collecting terminado>=0.8.3 (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/5f/17/fa9560738187cdb185d282a120ec4a147064f001d7c0114271ca1374d0a1/terminado-0.9.1-py3-none-any.whl
Collecting Send2Trash (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/49/46/c3dc27481d1cc57b9385aff41c474ceb7714f7935b1247194adae45db714/Send2Trash-1.5.0-py3-none-any.whl
Collecting nbconvert (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/13/2f/acbe7006548f3914456ee47f97a2033b1b2f3daf921b12ac94105d87c163/nbconvert-6.0.7-py3-none-any.whl
Collecting argon2-cffi (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/e0/d7/5da06217807106ed6d7b4f5ccb8ec5e3f9ec969217faad4b5d1af0b55101/argon2_cffi-20.1.0-cp35-abi3-manylinux1_x86_64.whl
Collecting prometheus-client (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/f4/7e/ef341c67ed43ad2e39633a35c28b77bc555f9572f4df4fee11c2b467db00/prometheus_client-0.9.0-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/d1/29/605c2cc68a9992d18dada28206eeada56ea4bd07a239669da41674648b6f/ptyprocess-0.6.0-py2.py3-none-any.whl
Collecting parso<0.8.0,>=0.7.0 (from jedi>=0.10->ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/93/d1/e635bdde32890db5aeb2ffbde17e74f68986305a4466b0aa373b861e3f00/parso-0.7.1-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=4.0.0; python_version >= "3.3"->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/59/7c/e39aca596badaf1b78e8f547c807b04dae603a433d3e7a7e04d67f2ef3e5/wcwidth-0.2.5-py2.py3-none-any.whl
Collecting pandocfilters>=1.4.1 (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
Collecting defusedxml (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/06/74/9b387472866358ebc08732de3da6dc48e44b0aacd2ddaa5cb85ab7e986a2/defusedxml-0.6.0-py2.py3-none-any.whl
Collecting bleach (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/03/c8/b7ed0dfea5cb287907bd22c5ff7c3ed0a65b346f2a4cf916eb9e83be66b3/bleach-3.2.1-py2.py3-none-any.whl
Collecting jupyterlab-pygments (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/a8/6f/c34288766797193b512c6508f5994b830fb06134fdc4ca8214daba0aa443/jupyterlab_pygments-0.1.2-py2.py3-none-any.whl
Collecting mistune<2,>=0.8.1 (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/09/ec/4b43dae793655b7d8a25f76119624350b4d65eb663459eb9603d7f1f0345/mistune-0.8.4-py2.py3-none-any.whl
Collecting testpath (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/1b/9e/1a170feaa54f22aeb5a5d16c9015e82234275a3c8ab630b552493f9cb8a9/testpath-0.4.4-py2.py3-none-any.whl
Collecting nbclient<0.6.0,>=0.5.0 (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/fd/4f/5cbd9bdb30bfaad620f028711bf232b9cec8fdff1dcf68d9259254fcddeb/nbclient-0.5.1-py3-none-any.whl
Collecting cffi>=1.0.0 (from argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/1c/1a/90fa7e7ee05d91d0339ef264bd8c008f57292aba4a91ec512a0bbb379d1d/cffi-1.14.4-cp36-cp36m-manylinux1_x86_64.whl
Collecting webencodings (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl
Collecting async-generator (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/71/52/39d20e03abd0ac9159c162ec24b93fbcaa111e8400308f2465432495ca2b/async_generator-1.10-py3-none-any.whl
Collecting nest-asyncio (from nbclient<0.6.0,>=0.5.0->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/5c/33/10805a3359f56ac4f3b520e64b9d5e6a288d87be95777b8023c64cba60f1/nest_asyncio-1.4.3-py3-none-any.whl
Collecting pycparser (from cffi>=1.0.0->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->pydeck>=0.1.dev5->streamlit)
  Using cached https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl
Installing collected packages: smmap, gitdb, gitpython, pytz, tzlocal, cachetools, pillow, ipython-genutils, six, decorator, traitlets, python-dateutil, pyzmq, tornado, jupyter-core, jupyter-client, ptyprocess, pexpect, pickleshare, setuptools, pygments, backcall, parso, jedi, wcwidth, prompt-toolkit, ipython, ipykernel, MarkupSafe, jinja2, terminado, Send2Trash, pandocfilters, defusedxml, pyparsing, packaging, webencodings, bleach, jupyterlab-pygments, entrypoints, mistune, attrs, pyrsistent, typing-extensions, zipp, importlib-metadata, jsonschema, nbformat, testpath, async-generator, nest-asyncio, nbclient, nbconvert, pycparser, cffi, argon2-cffi, prometheus-client, notebook, widgetsnbextension, ipywidgets, numpy, pydeck, click, astor, blinker, pandas, toolz, altair, chardet, urllib3, certifi, idna, requests, base58, protobuf, toml, watchdog, validators, pyarrow, streamlit
Segmentation fault (core dumped)
ubuntu@ip-172-31-36-199:~$ streamlit hello
streamlit: command not found```

@thiago

When it worked for me with the patch, I used Miniconda or Anaconda.

@thiago

Did you ever get a chance to look at this?

Hey, sorry, I looked at this then completely forgot to post here!

The error message above doesn’t really help much. It just says segmentation fault without much of an explanation.

Can you try running PIP in the most verbose mode?

pip install -vvv streamlit

Will try it out when I have more time.

@thiago I tried starting fresh with DigitalOcean droplet. Same error with:
pip install -vvv streamlit

Must be something on my computer? But that doesn’t make much sense since it’s a virtual server?

2021-01-27 04:00:00.908 Uncaught exception GET /stream (173.71.169.84)
HTTPServerRequest(protocol=‘http’, host=‘157.245.11.199:8501’, method=‘GET’, uri=’/stream’, version=‘HTTP/1.1’, remote_ip=‘173.71.169.84’)
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/web.py”, line 1704, in _execute
result = await result
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 278, in get
await self.ws_connection.accept_connection(self)
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 879, in accept_connection
await self._accept_connection(handler)
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 962, in _accept_connection
await self._receive_frame_loop()
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1116, in _receive_frame_loop
await self._receive_frame()
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1205, in _receive_frame
handled_future = self._handle_message(opcode, data)
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1217, in _handle_message
data = self._decompressor.decompress(data)
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 798, in decompress
result = decompressor.decompress(
zlib.error: Error -3 while decompressing data: invalid distance too far back
2021-01-27 04:01:02.755 Task exception was never retrieved
future: <Task finished name=‘Task-1548’ coro=<WebSocketProtocol13.write_message..wrapper() done, defined at /usr/local/lib/python3.8/dist-packages/tornado/websocket.py:1100> exception=WebSocketClosedError()>
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1102, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1104, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
2021-01-27 04:01:06.160 Task exception was never retrieved
future: <Task finished name=‘Task-1728’ coro=<WebSocketProtocol13.write_message..wrapper() done, defined at /usr/local/lib/python3.8/dist-packages/tornado/websocket.py:1100> exception=WebSocketClosedError()>
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1102, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1104, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
2021-01-27 04:01:44.296 Task exception was never retrieved
future: <Task finished name=‘Task-3780’ coro=<WebSocketProtocol13.write_message..wrapper() done, defined at /usr/local/lib/python3.8/dist-packages/tornado/websocket.py:1100> exception=WebSocketClosedError()>
Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1102, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/dist-packages/tornado/websocket.py”, line 1104, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError

It works on my phone but not my computer? Do you know if that is a firewall issue? Do you know how to fix it?

@thiago I determined that it is my browser because it works in Firefox but not Chrome. I tried disabling all extensions, incognito mode, and turning off the firewall - same problem. Can you think what else it could be?