2017-07-05 59 views
1

我目前正在做一個動作檢測程序。當檢測到運動時,我已經設法捕獲圖像。我希望拍攝時將照片上傳到Dropbox。對於前幾張圖像它可以正常工作,但在一段時間後停止工作。它顯示了以下錯誤上傳圖片時出現Dropbox API錯誤(Python)

ApiError: ApiError('', UploadError(u'path', UploadWriteFailed(reason=WriteError(u'conflict', WriteConflictError(u'file', None)), upload_session_id=u'')))

這是我的代碼

def TakePicUpload(avg): 

回答

1

你得到一個fileWriteConflictError

https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.files.WriteConflictError

這是記錄爲:

There’s a file in the way.

所以,這只是意味着你已經在路徑上(你的情況下是savetolocation)你想要上傳的路徑。

您可以刪除該文件,如果你不想要它,或指定一個不同的寫模式調用files_upload時:

https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_upload

+0

感謝的人,現在它的工作原理,但它是當它開始超laggy在檢測到運動時捕獲圖像。你有任何想法如何減少滯後@Greg – Aplin

+0

@Aplin這聽起來像是發生在Dropbox步驟之前,所以恐怕這超出了我的專業領域。道歉我不能有更多的幫助! – Greg

相關問題