Issues loading pickle data

Hello,

I would like to load pickle files from my github repository, the file is called is located within a folder named Results.

Locally, running the streamlit in a web browser works really well, but I am having trouble with streamlit teams. The error message is vague:
Whoops — something went wrong! An error has been logged.

I have tried the following combinations

df = st.pd.read_pickle('Results\\mypicklefile')

df = pd.read_pickle('https://github.com/user/mydirectoryname/raw/main/Results/mypicklefile')

pickle_file = open("Results\\mypicklefile", "rb")
df = pickle.load(pickle_file)

df = pickle.load(open('Results\\mypicklefile','rb'))

with open("Results/mypicklefile.pkl", 'rb') as pfile:  
    df=pickle.load(pfile)

I am using python 3.8 and the default settings to save pickle files. I do not wish to switch to 3.7.

Advice on how to proceed would be greatly appreciated.

1 Like

Within the Streamlit Cloud interface, if you click on the hamburger menu (3 vertical dots), it will bring up the secrets and the Python version setting interface. You can switch to Python 3.8 there.

Best,
Randy

Hello Randy,

Thank you very much for your response.

I can only see the “Viewers” and “Secrets” within the app settings

Hmmm, I thought that was publicly available to everyone. Let me check with our internal folks why that might be hidden.

Apparently, the solution is actually to delete and re-deploy. The Python version is under ‘Advanced Settings’

I’ll make the suggestion to the Product team that it should be available from the Settings directly.

Best,
Randy

Thank you, all good now!

Best Wishes
Dani

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.