I try to applicate the download button on my streamlit application.
But the following error occured.
AttributeError: 'NoneType' object has no attribute 'load_and_get_id'
Traceback:
File "/usr/lib/python_udf/e90652350a59b36d73cafb09e244340781a4b377fdbf050165b84584fe4eeae0/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/tmp/appRoot/streamlit_app.py", line 260, in <module>
st.download_button('Download binary file', binary_contents)
File "/usr/lib/python_udf/e90652350a59b36d73cafb09e244340781a4b377fdbf050165b84584fe4eeae0/lib/python3.8/site-packages/streamlit/runtime/metrics_util.py", line 332, in wrapped_func
result = non_optional_func(*args, **kwargs)
File "/usr/lib/python_udf/e90652350a59b36d73cafb09e244340781a4b377fdbf050165b84584fe4eeae0/lib/python3.8/site-packages/streamlit/elements/button.py", line 311, in download_button
return self._download_button(
File "/usr/lib/python_udf/e90652350a59b36d73cafb09e244340781a4b377fdbf050165b84584fe4eeae0/lib/python3.8/site-packages/streamlit/elements/button.py", line 355, in _download_button
marshall_file(
File "/usr/lib/python_udf/e90652350a59b36d73cafb09e244340781a4b377fdbf050165b84584fe4eeae0/lib/python3.8/site-packages/streamlit/elements/button.py", line 490, in marshall_file
file_url = runtime.get_instance().media_file_mgr.add(
File "/usr/lib/python_udf/e90652350a59b36d73cafb09e244340781a4b377fdbf050165b84584fe4eeae0/lib/python3.8/site-packages/streamlit/runtime/media_file_manager.py", line 222, in add
file_id = self._storage.load_and_get_id(
Please tell me how to solve it.