Hi all,
My streamlit app is intended to be a classification app that predicts the position a user should play in Basketball depending on the physical/statistical attributes they enter in the app.
The deployed app deployed on the Community Cloud runs into an Attribute error after the user clicks on ‘Classify’. However, the app runs fine [locally] (GitHub - danielliu2707/positionn) (linked is the GitHub Repo).
I’m currently running Python 3.12.4 and Streamlit version 1.29.0.
Here is the full error message:
AttributeError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/mount/src/positionn/app.py", line 385, in <module>
main()
File "/mount/src/positionn/app.py", line 217, in main
predicted_pos = ohe_predictor.inverse_transform(physical_predictor.predict(input_features))[0][0] # obtain prediction using models
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.12/site-packages/sklearn/pipeline.py", line 788, in predict
return self.steps[-1][1].predict(Xt, **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.12/site-packages/sklearn/ensemble/_forest.py", line 904, in predict
proba = self.predict_proba(X)
^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.12/site-packages/sklearn/ensemble/_forest.py", line 946, in predict_proba
X = self._validate_X_predict(X)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.12/site-packages/sklearn/ensemble/_forest.py", line 633, in _validate_X_predict
if self.estimators_[0]._support_missing_values(X):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.12/site-packages/sklearn/tree/_classes.py", line 188, in _support_missing_values
and self.monotonic_cst is None
^^^^^^^^^^^^^^^^^^