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.

AttributeError: module 'streamlit' has no attribute 'columns'

See original GitHub issue

Summary

While doing this https://docs.streamlit.io/en/stable/getting_started.html

I get the above error whenever I try cols = st.columns(2)

left_column, right_column = st.columns([1,2])
pressed = left_column.button('Press me?')
if pressed:
    right_column.write("Woohoo!")

expander = st.expander("FAQ")
expander.write("Here you could put in some really, really long explanations...")

Actual behavior:

AttributeError: module ‘streamlit’ has no attribute ‘columns’ Traceback: File “c:\python\python39\lib\site-packages\streamlit\script_runner.py”, line 337, in _run_script exec(code, module.dict) File “D:_Orata_Cloud\main.py”, line 10, in <module> left_column, right_column = st.columns(2)

Is this a regression?

That is, did this use to work the way you expected in the past? no

Debug info

  • Streamlit version: Streamlit, version 0.89.0
  • Python version: Python 3.9.7
  • Using PipEnv
  • OS version: win 10
  • Browser version: Edge

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
narjissbentouhamicommented, Aug 25, 2022

please what was the solution ? I’m facing the same problem now

0reactions
MuratFancommented, Sep 4, 2022

I think it is only the version problem. upgrade and then solved it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'streamlit' has no attribute 'beta_columns'
Hi, I was trying to lay out the dropdown into columns but when I use the function st.beta_columns() I get an attribute error...
Read more >
AttributeError: module 'streamlit' has no attribute 'metric'
I am using streamlit metric module in my web app but it results in a attribute error. like this one: AttributeError: module streamlit...
Read more >
module 'streamlit' has no attribute 'tabs' - You.com | The AI ...
import streamlit as st import pandas as pd st.title('Data Analytics Platform') AttributeError: module 'streamlit' has no attribute 'title' My problem was due to ......
Read more >
[Solved] AttributeError: module has no attribute ... - YouTube
[Solved] AttributeError : module has no attribute 'Attribute'. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >
module 'streamlit' has no attribute 'session_state'が出る - Teratail
概要`streamlit run main.py`を実行すると、 `AttributeError: module 'streamlit' has no attribute 'session_s.
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