xybu / onedrived-dev

A Microsoft OneDrive client for Linux, written in Python3.
https://github.com/xybu/onedrived-dev
MIT License
705 stars 78 forks source link

Error on uploading #25

Open alikhil opened 7 years ago

alikhil commented 7 years ago
[2017-02-10 11:09:14,837] ERROR: Worker-1: Encountered API Error:  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
[2017-02-10 11:09:14,837] ERROR: Worker-1: Error uploading file "/home/alik/OneDrive/books/programming/C#/c-in-depth-3rd-edition-jon-skeet.pdf":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
xybu commented 7 years ago

The two lines of log are not enough to analyze the problem.

A file upload operation is done by first uploading the file content, then updating the remote timestamp. I don't know which operation caused the problem from the the two lines. And I don't know who caused the problem either -- the file (does the program complain about other files?), onedrived, onedrive python sdk, python-requests, or onedrive server are all possible.

alikhil commented 7 years ago

It's new local file. I tried to restart program but it did not helped. I am attaching this file. Maybe it will help to reproduce error. c-in-depth-3rd-edition-jon-skeet.pdf

xybu commented 7 years ago

I tried the file but it was uploaded successfully. May you run the following commands on your machine and share the output? Also, are you on the latest commit of this repo?

$ uname -a
$ pip3 list
$ pip3 list -o
brauliobo commented 6 years ago

I'm having the same problem for several files, for instance

[2018-07-25 18:13:18,812] ERROR: Worker-5: Error uploading file "/home/braulio/OneDrive/AUDIO/Music/Dada Nabhaniilananda/Ananda Kiirtan 3 Live/04 Kiirtan - Reprise of #1.opus":  - The request contains an entity body but no Content-Type header. The inferred media type 'application/octet-stream' is not supported for this resource..
derrix060 commented 6 years ago

application/octet-stream is when the media type remains unknown by the server. Reference

NathanIceSea commented 5 years ago

Not accessible to ngrok service might be to blame for that, could anybody figure out how to configure alternative tunnel. I'm having the same issue