Working locally but not on streamlit cloud

The problem is that the uploaded file is actually just saved to memory, not actually saved to the disk. If you really need it saved to the disk, I would recommend using NamedTemporaryFile, something like ValueError: Expected str or list, got <class 'streamlit.runtime.uploaded_file_manager.UploadedFile'> - #2 by blackary

However, in your case, you should be able to work with the uploaded file’s value itself. Here’s a super-simplified example, which shows how to just get a dictionary out of the uploaded json object: