-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
youtube.videos().insert() fails silently, returns "valid" response #893
Comments
Hi @CodeSpent, When you say "fails silently" is the video not being uploaded, or is it being uploaded with some fields being ignored? |
@busunkim96 sorry should've be more verbose. No video is uploaded, but a video resource is returned. Title and description are there and status states uploaded, but there's nothing on the target channel. Is there something additional I need to do in order for the media itself to post, and if so, where might that be documented? |
Hm, that's odd. I would expect one of these errors to be returned if something went wrong. If you search for the video with the resource's ID are you able to find it? |
@busunkim96 this is the response, so does not appear so. Video id returned for reference (also in the full response above):
|
I am seeing in Youtube Studio that the video is there with the error message "Processing Abandoned". Is there anywhere I can get some support on this? I am able to upload the same video manually without any issue, but I can't really debug this when the client implies that everything is succeeding. Most recent video id is: ZJlszmP1oto |
Hi @CodeSpent, I've sent an email to the Youtube Data API folks to see if they have a definitive answer. In the meantime I'd take a look at these Stack Overflow posts. One answer suggests trying the upload via the UI to make sure there are no issues with the video itself. |
I have tried that and able to upload via UI, as well I have used https://github.com/tokland/youtube-upload/ to successfully upload my test video from the server without issue. There's obviously something wrong with my code, but I don't know all the conditions that will return a video ID when a video isn't actually uploaded which makes this tough to debug.
I can also conclude with above that the video does make it to MediaFileUpload just fine. I've tried numerous chunk sizes including Any help from them would be greatly appreciated. Does not appear to be an issue with the client, there's probably just some condition that's undocumented (or difficult to find) that is being met to cause the silent failure. Considering this is not an issue with the google-api-python-client in particular, you may close this if you'd like, but maybe this reveals a case we can discover where it might be good to add a new exception or something to the client so developers are able to properly diagnose this issue. |
I've figured this out. It turned out to be a permissions issue with the directory. Maybe there's somewhere in the client it can be determined and alerted to the developer that the file is not able to be uploaded? Not sure, but did get it rectified, thank you for your help! |
Ah that's good to hear! Opened #910 to track the possibility of adding more checks around MediaFileUpload |
hey , How did you fix it ? |
Environment details
python 3.5
pip 9.0.0
google-api-python-client
version:1.8.2
Steps to reproduce
Code example
Stack trace
I'm sure there is another issue here somewhere, but not providing any context is poor developer experience. We've spent hours trying to guess what the issue could be, and we shouldn't have to. Documenting why this type of response occurs would be helpful in debugging.
The text was updated successfully, but these errors were encountered: