'NoneType' object is not subscriptable

Hi,
I am getting below error, while executing a python script.

TypeError: ‘NoneType’ object is not subscriptable

Traceback:

File “C:\Users\spatn\anaconda3\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py”, line 552, in _run_script
exec(code, module.dict)

Kindly advise, what is the ERROR & HOW TO FIX THIS ?

Thank you.

Hi @Madhu ,

It would be ideal to see the code falling, but usually, this error means that you are treating something as a method that is not. Tag me if you paste the code here to better assist you.

–Carlos