Use st.cache_data instead of st.experimental_memo message box without any function usage

Summary

I am having trouble with getting two message boxes at .py file initialization.

The message boxes display “st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs.”.

I found that st.streamlit_image_select.image_select is where the message box is generated, and I would like to remove them even when the file is initialized.

Hope I can get any suggestions or advices on this. Thank you very much in advanced.

Steps to reproduce

Code snippet:

# configs
work_path = 'C:/Users/me/Desktop/webpage'
IMG_SIZE = 512
image1 = load_dicom(f"{work_path}/images/1.2.826.0.1.3680043.1363_120.dcm")
image2 = load_dicom(f"{work_path}/images/1.2.826.0.1.3680043.4202_134.dcm")
image3 = load_dicom(f"{work_path}/images/1.2.826.0.1.3680043.30067_108.dcm")
image4 = load_dicom(f"{work_path}/images/1.2.826.0.1.3680043.26979_144.dcm")

# display images
img = image_select(
    label="Select a patient",
    images=[image1, image2, image3, image4,],
    captions=[
        "1.2.826.0.1.3680043.1363",
        "1.2.826.0.1.3680043.4202",
        "1.2.826.0.1.3680043.30067",
        "1.2.826.0.1.3680043.26979"
    ],
    return_value="index"
)

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

Explain what you expect to happen when you run the code above.

Actual behavior:

Explain the undesired behavior or error you see when you run the code above.
If you’re seeing an error message, share the full contents of the error message here.

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Requirements file

Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.

Links

  • Link to your GitHub repo:
  • Link to your deployed app:

Additional information

If needed, add any other context about the problem here.

Hey @doyeonkimm,

It sounds like you’re using @jrieke’s image select component, which hasn’t been updated to the more recent caching functions yet. A community member opened an Issue for this here – I’d recommend up-voting it and/or writing a PR for the component to upgrade to the new caching functions (should be as simple as just replacing usage of the old functions with the new functions).

Thank you very much:)

1 Like

It’s fixed now!

1 Like

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