St.beta_columns error

<streamlit.delta_generator.DeltaGenerator object at 0x000002992BBBD370>

when i st.write the variable i get this error…

lat = st.text_input('Lat:', '19') 
long = st.text_input('Long:', '12')

rewrote as

lat, long = st.beta_columns(2)
lat.text_input('Lat:', '19') 
long.text_input('Lat:', '12')

I am not sure if I understood it correctly. Can you please share a minimal reproducible example?
Looking at the available code after “rewrote as”: Only the last line is wrong, you can’t write a beta column.

1 Like

how would u write the long variable?

import streamlit as st
import pandas as pd

st.write('Welcome to app1')

lat, long, alt = st.beta_columns(3)

lat.text_input('Lat:', '39') 
long.text_input('Long:', '-102')
alt.text_input('Alt:', '0') 


TypeError: ‘DeltaGenerator’ object is not iterable

How do we reuse that variable? My code needs to to get Parameters for user input for an api call but at the variable is breaking the script if i use new layouts

Just make a=lat.text_input… and use a. Equate the text inputs to a variable! After that you can use write to write that variable. Check the examples.

Cool that worked great thx.

Now I’m off to try to see if streamlit will run Jupyter cell as a block in the app.