Can you post a link to your code? Also, you’re passing your uploaded file into a function that I cannot see, I imagine that somewhere in that function your passing the uploaded file directly into something that was expected “str”, “bytes” or a path.
Check out this discussion where someone has a similar issue (docs typo already fixed):