Panopto's sample upload code seems to be broken.
Hi —
I'm trying to use Panopto's sample code to upload videos via the API.
Code repository: https://github.com/Panopto/upload-python-sample/tree/master/simplest
When I run the script, it appears to upload successfully, but then it gets stuck in a loop checking the status. The status is always "3" (processing). When I asked with Panopto support why my videos were stuck processing, they told me that no media had been uploaded.
The output of the script is below. Why is this not working?
—Colin
Calling POST PublicAPI/REST/sessionUpload endpoint
ID: a0e8247a-bae6-468d-ba39-b30e00dba227
target: https://harvard.hosted.panopto.com/Panopto/Upload/dd5cd4dc-2547-4cc4-bac4-b30e00dba227
Upload ../test.mp4 with multipart upload protocol
endpoint URL: https://harvard.hosted.panopto.com/Panopto
bucket name : Upload
object key : dd5cd4dc-2547-4cc4-bac4-b30e00dba227/test.mp4
-- 1030158 of 1030158 bytes uploaded
-- complete called.
Writing manifest file: upload_manifest_generated.xml
Upload upload_manifest_generated.xml with multipart upload protocol
endpoint URL: https://harvard.hosted.panopto.com/Panopto
bucket name : Upload
object key : dd5cd4dc-2547-4cc4-bac4-b30e00dba227/upload_manifest_generated.xml
-- 550 of 550 bytes uploaded
-- complete called.
Calling PUT PublicAPI/REST/sessionUpload/a0e8247a-bae6-468d-ba39-b30e00dba227 endpoint
done
Calling GET PublicAPI/REST/sessionUpload/a0e8247a-bae6-468d-ba39-b30e00dba227 endpoint
Response: {'ID': 'a0e8247a-bae6-468d-ba39-b30e00dba227', 'Message': 'Processing', 'State': 3, 'UploadTarget': 'https://harvard.hosted.panopto.com/Panopto/Upload/dd5cd4dc-2547-4cc4-bac4-b30e00dba227', 'FolderId': '437a0000-3c7c-441e-b869-b2ed00d8e6ae', 'SessionId': '417f6131-f822-4977-915d-b30e00dba6e5'}
Calling GET PublicAPI/REST/sessionUpload/a0e8247a-bae6-468d-ba39-b30e00dba227 endpoint
Response: {'ID': 'a0e8247a-bae6-468d-ba39-b30e00dba227', 'Message': 'Processing', 'State': 3, 'UploadTarget': 'https://harvard.hosted.panopto.com/Panopto/Upload/dd5cd4dc-2547-4cc4-bac4-b30e00dba227', 'FolderId': '437a0000-3c7c-441e-b869-b2ed00d8e6ae', 'SessionId': '417f6131-f822-4977-915d-b30e00dba6e5'}
Calling GET PublicAPI/REST/sessionUpload/a0e8247a-bae6-468d-ba39-b30e00dba227 endpoint
Response: {'ID': 'a0e8247a-bae6-468d-ba39-b30e00dba227', 'Message': 'Processing', 'State': 3, 'UploadTarget': 'https://harvard.hosted.panopto.com/Panopto/Upload/dd5cd4dc-2547-4cc4-bac4-b30e00dba227', 'FolderId': '437a0000-3c7c-441e-b869-b2ed00d8e6ae', 'SessionId': '417f6131-f822-4977-915d-b30e00dba6e5'}
Calling GET PublicAPI/REST/sessionUpload/a0e8247a-bae6-468d-ba39-b30e00dba227 endpoint
Response: {'ID': 'a0e8247a-bae6-468d-ba39-b30e00dba227', 'Message': 'Processing', 'State': 3, 'UploadTarget': 'https://harvard.hosted.panopto.com/Panopto/Upload/dd5cd4dc-2547-4cc4-bac4-b30e00dba227', 'FolderId': '437a0000-3c7c-441e-b869-b2ed00d8e6ae', 'SessionId': '417f6131-f822-4977-915d-b30e00dba6e5'}
Answers
Hello Colin,
I inspected the data you gave and found that the file you were uploading seems to be stuck in a "Processing" state infinitely. The script is giving you the correct information about the status of your file upload. It should exit from the loop checking status once you get a "200 OK" HTTP response.
As for the reason it got stuck in a "Processing" state, the file upload might have broken halfway through which is why it did not succeed. I recommend retrying with a different ID and checking the result.
Thank you.
- Aish