As the error message states, the 'file' field you've POSTed does not contain a file, it's just a filename. How does the file contents magically get sent to Strava in your example code?
There's an explicit mention of this in the docs that specifically applies to curl but equally to you here (except just prefixing it with '@' obviously won't work in Python and you need to write more code to read the contents of your file).
> For file, the @ symbol means to use the content of the file
at the file path we specify. Otherwise, we are just giving it a string
that’s the file name, not the content.