After upgrading streamlit to 68.0, i am unable to load the app, keep getting object does not support property or method 'flatMap'

Hi guys,

I upgraded streamlit to 68 today. After upgrading i am unable to run the app. I keep getting object does not support property or method ‘flatMap’. Same code used to work on 65

I am using python 3.6.3. I have restarted the machine, still it does not solve the issue. Please help

Hi @karthico,

Are you able to share a reproducible code snippet for your problem so we can test on our side ?

Best,
Fanilo

hi sure, i have attached the code snippet below

import pandas as pd
import numpy as np
import streamlit as st
import SessionState
import querying as q
import pickle
import sql_maker_summaryv1 as smk


from sqlalchemy import create_engine
import random

st.sidebar.title("Pages")
radio = st.sidebar.radio(label="", options=["Login", "Analyse", "Help"])

session_state = SessionState.SessionState.get(username=0, password=0,log="Failure",forecast = 'CQ',final_vals = [],
                                              field_values=pickle.load(open("c:\\siesmic\\field_values.pckl","rb")),
                                              df=pd.DataFrame(),
                                              dims="geo_level1",retrieve=False,chosen=[],final_df=pd.DataFrame()
                                              )



if radio == "Login":
    st.title("Login Page")
    session_state.username = st.text_input(label="Username", value=session_state.username)
    session_state.password = st.text_input(label="Password", value=session_state.password)

    if st.button("Login"):
        session_state.pw = q.querying("mos4",
                                      sqls="select pw from custom_decks.credentials where userid = 'pwd'".replace('pwd',
                                                                                                                  session_state.username))
        session_state.pw = session_state.pw.import_sql().connect_warehouse().pull_data().data
        if session_state.pw.empty:
            st.error("Please check username/password")
            session_state.log = "Failure"
        else:
            session_state.pw = session_state.pw.loc[0]['pw']
            if session_state.password == session_state.pw:
                st.success("Welcome!! " + session_state.username + ". You have successfully logged in")
                session_state.log = "success"
                radio = "New report"
            else:
                st.warning("Please check username or password")
                session_state.log = "Failure"
                st.write(session_state.log)



elif radio == "Analyse":
    st.title("Scuba - Seismic")
    session_state.filter = st.selectbox("Apply Filter",list(session_state.field_values.keys()))
    if session_state.filter[-4:] == "date":
        try:
            temp = st.selectbox("choose type", ['=', ">", ">=", "<", "<="])
            session_state.selection = st.date_input("Please select the date")
            session_state.filter_values = [temp, session_state.selection]
        except (TypeError):
            pass
    else:
        session_state.filter_values = st.multiselect("Select Values on Filters",session_state.field_values[session_state.filter])

    if st.button("Add Filter"):
        if session_state.filter_values != []:
            session_state.df = session_state.df.append(
                {'filter': session_state.filter, 'filter values':
                    [str(i) for i in session_state.filter_values]}, ignore_index=True)
    if st.button("Reset"):
        session_state.df = pd.DataFrame(columns=['filter', 'filter values'])

    if st.button("Run"):
        st.text("Filters Selected")
        session_state.filter_dict = {i[0]: i[1] for i in session_state.df.values}
        st.info(session_state.filter_dict)
        op_df = smk.sql_makerv1(session_state.filter_dict)
        print(session_state.filter_dict)
        st.markdown("## Total Documents")
        st.info(op_df.text)


        st.markdown("## Actionable Documents")
        st.info(op_df.actionable_text)

        st.markdown("## Views")
        st.info(op_df.view_text)
        st.info(op_df.view_dist)



        st.markdown("## Actions performed on documents:")
        st.markdown("### Downloads")
        st.info(op_df.downloadable_text)
        st.markdown("### Distribution of Downloads:")
        st.info(op_df.download_dist)

        st.markdown("### Added to Workspace")
        st.info(op_df.a2w_text)
        st.markdown("### Distribution of Add to Workspace:")
        st.info(op_df.a2w_dist)

        st.markdown("### livesend:")
        st.info(op_df.livesend_text)
        st.markdown("### Distribution of Livesend:")
        st.info(op_df.livesend_dist)

        st.markdown("### Livesend Interactions")
        st.info(op_df.interactions)

        #checker = check(session_state.dims, session_state.filter_dict).finalprocess().message

    #st.write(session_state.df)