Not able to read pickle file while running update of 3 indicator scanner

I would like to run the 3 indicator scanner with latest data for S&P 500 component stocks. I created pickle file with daily OHLCV data. But while running the python code for scanner,



ticker_dictionary = pd.read_pickle('C:/…/S_P500_OHLCV_2023.bz2')



I get following error: 

UnpicklingError: invalid load key, 'D'

Please help.

Hi,



This error can arise due to different reasons, which could be the file location not mentioned correctly, the python library version used for creating the pickle file and for reading the file is different, or not including the bz2 library while attempting to read the file.



Can you share more details on how you created the pickle file and which library version was used as well.



Thanks.