That appears to be because you are passing a StringIO object to read_text, instead of a filename, which is what it is expecting. You can see an example of using NamedTemporaryFile here, and elsewhere on this forum Get path from file_uploader() - #17 by ennui
blackary
4
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| When opening an uploaded csv file :TypeError: expected str, bytes or os.PathLike object, not UploadedFile | 4 | 673 | February 5, 2025 | |
| File_uploader() - I/O operation on closed file | 0 | 1009 | October 23, 2020 | |
| Unable to read files using standard file_uploader | 1 | 3562 | March 27, 2020 | |
| St.file_uploader with TDMtermite (requires path of file) | 2 | 790 | September 13, 2022 | |
| CSV over 2 GB | 8 | 4802 | August 19, 2020 |