Prevent data leak

  1. the link to the public deployed app
    https://gurgaonhomevaluepredictorapp-45bzfbowjqwy5shaaut5y3.streamlit.app/

  2. the link to your app’s public GitHub repository (including a [requirements file]
    GitHub - Abhijeetkashyap-ds87/Gurgaonhomevaluepredictorapp: This repo containing all pkl file,and python code

  3. KeyError: 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).
    Details

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/gurgaonhomevaluepredictorapp/pages/Recomandation.py", line 63, in <module>
    rec_df = recommendation(similarity_matrix, property)
  File "/mount/src/gurgaonhomevaluepredictorapp/pages/Recomandation.py", line 35, in recommendation
    sim_score = list(enumerate(sim_matrix[df.index.get_loc(property_name)]))
  File "/home/adminuser/venv/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3809, in get_loc
    raise KeyError(key) from err
KeyError: None

streamlit==1.28.0

Hi @Abhijeetkashyap-ds87 . I didn’t find any bug in your application. The application is running smoothly in cloud.


On a first run app runs smoothly but on 2nd time in recomandation this error had shown

One thing to clarify @Abhijeetkashyap-ds87 that 2md run means rerun or reboot or choosing any option from dorp down menu second time?

choosing any option from dorp down menu second time?

But it’s working for me in the cloud application.