question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

streamlit hello raises exception

See original GitHub issue

Summary

Type here a clear and concise description of the bug. Aim for 2-3 sentences.

Steps to reproduce

docker run -it -p 8501:8501 ubuntu:19.04 bash

Then in the container, run:

apt-get update
apt-get install python python-pip build-essential
pip install streamlit
streamlit hello

then pick the 2nd demo

Expected behavior:

No exception raised

Actual behavior:

Exception raised

Is this a regression?

not sure

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: python2.7
  • Using Conda? no
  • OS version: Ubuntu Linux
  • Browser version:

Additional information

If needed, add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
monchiercommented, Oct 18, 2019

It seems there is an issue with configparser that is installed by apt-get. This only happen for Python 2.7. A possible workaround is to remove configparser via apt-get before pip install streamlit:

apt-get update
apt-get install python python-pip 
apt-get remove python-configparser
pip install streamlit
streamlit hello

This will take care of the bug.

Another solution is to use a different python image. For example for Python-2.7: python:2.7-slim does not have this problem, likely because python is preinstalled and the apt-get does not conflict with pip.

@jakevdp this will probably work for altair as well.


At this point, we’re at a loss how to automatically fix this for users. But it seems very localized to the specific Docker image, and specifically on Python 2.x — and we have the work-around above. So we’ll stop work on this at the moment.

If anyone has a solution, please let us know. We’ll be happy to merge it in!

0reactions
monchiercommented, Mar 3, 2020

This is a Python2 only bug. I think we should close it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while running streamlit hello
So I had just installed streamlit yesterday and it working all fine. All of sudden it doesn't work now. streamlit hello throws some...
Read more >
"streamlit hello" -- TypeError: Protocols cannot be instantiated
1 to 1.12.0, streamlit server keeps raising exceptions and clients get stuck at loading page 'please wait...' ### Steps to reproduce server error...
Read more >
How to stop streamlit when it detectan error?
In the snippet below the report stops executing after the exception. import streamlit as st slider = st.slider('slider', 0, 100, 25, 1) raise...
Read more >
Handling input errors - Using Streamlit
Hello @alihassanoo, ... This is where your exception is raised, thus where you should put your try/catch block:
Read more >
Stop script when there is error - Using Streamlit
Hello All, I have two questions which I will create two post separately. ... “”“Special Exception which does not display any output to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found