As the title says, I’m not able to run my app on streamlit cloud - it just says File Not Found when I try to upload it.
However, when running it locally, it works fine.
Here is the app with github linked: https://graingerkid-code-coverage-app-z1n1zf.streamlit.app/
I feel like I’m doing something super silly tbh…
Any help is much appreciated - there is an example JSON file. I deleted the file as I realised it was working, like I’m reading it from the directory itself, which I assume is a hint to the problem, but I just can’t figure it out.
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:
That’s fixed it. Thank you mate, I don’t think I’d have figured that out on my own. Legend
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.