0

I try to deploy my streamlit project, and in the localhost it works perfectly. But when I try to deploy the app at Streamlit, it prints "recursion depth exceeded while calling a Python object". I am sure that I do not use recursion, and when I tried to fix the code, i commented these strings below, and all worked. Can somebody help me with this problem? """

number = st.slider('Выберите проходной балл', min_value=0, max_value=100, step=5)

# df['Pass Math'] = np.where(df['math score'] >= number, 'Passed', 'Not Passed')
# x1 = df['Pass Math'].value_counts()
# df['Pass Reading'] = np.where(df['reading score'] >= number, 'Passed', 'Not Passed')
# x2 = df['Pass Reading'].value_counts()
# df['Pass Writing'] = np.where(df['writing score'] >= number, 'Passed', 'Not Passed')
# x3 = df['Pass Writing'].value_counts()
# df['Passed All'] = (np.where(np.logical_and(df['writing score'] > number,
#                                             df['reading score'] > number,
#                                             df['math score'] > number), 'Passed', 'Not Passed'))
# x4 = df['Passed All'].value_counts()
# col1, col2, col3 = st.columns(3)
# with col1:
#     st.header('Math')
#     st.bar_chart(x1)
# with col2:
#     st.header('Reading')
#     st.bar_chart(x2)
# with col3:
#     st.header('Writing')
#     st.bar_chart(x3)
# st.header('All exams')
# st.bar_chart(x

"""

  • the problem might comes from [logical_and with more than two arrays](https://stackoverflow.com/questions/20528328/numpy-logical-or-for-more-than-two-arguments). Surprised that it works in local but not when deploying. – Ben.T May 18 '22 at 16:57

0 Answers0