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 ?


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

radio ="", options=["Login", "Analyse", "Help"])

session_state = SessionState.SessionState.get(username=0, password=0,log="Failure",forecast = 'CQ',final_vals = [],

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"): = q.querying("mos4",
                                      sqls="select pw from custom_decks.credentials where userid = 'pwd'".replace('pwd',
                                                                                                                  session_state.username)) =
            st.error("Please check username/password")
            session_state.log = "Failure"
            if session_state.password ==
                st.success("Welcome!! " + session_state.username + ". You have successfully logged in")
                session_state.log = "success"
                radio = "New report"
                st.warning("Please check username or password")
                session_state.log = "Failure"

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":
            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):
        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}
        op_df = smk.sql_makerv1(session_state.filter_dict)
        st.markdown("## Total Documents")

        st.markdown("## Actionable Documents")

        st.markdown("## Views")

        st.markdown("## Actions performed on documents:")
        st.markdown("### Downloads")
        st.markdown("### Distribution of Downloads:")

        st.markdown("### Added to Workspace")
        st.markdown("### Distribution of Add to Workspace:")

        st.markdown("### livesend:")
        st.markdown("### Distribution of Livesend:")

        st.markdown("### Livesend Interactions")

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