xybu / onedrive-d-old

Microsoft OneDrive client on Linux.
http://xybu.me/projects/onedrive-d/
GNU Lesser General Public License v3.0
820 stars 143 forks source link

Worker thread crashes if file removed from OneDrive #194

Open MrAksel opened 8 years ago

MrAksel commented 8 years ago

After noticing the initial sync from OneDrive to the harddisk took a very long time (because of many files), I started deleting some unnecessary files from my OneDrive folder to reduce the work to be done. I believe this caused a crash when one of the worker threads tried to download one of the removed files. This has caused 3 of 4 worker threads to crash now, with only one remaining downloading files. I suspect the last worker will also crash upon encountering the next deleted file.

Exception in thread worker0:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.4/dist-packages/onedrive_d-1.1.0dev-py3.4.egg/onedrive_d/od_worker_thread.py", line 448, in run
    self.download_file(task)
  File "/usr/local/lib/python3.4/dist-packages/onedrive_d-1.1.0dev-py3.4.egg/onedrive_d/od_worker_thread.py", line 397, in download_file
    if not self.api.get(task['remote_id'], task['local_path']):
  File "/usr/local/lib/python3.4/dist-packages/onedrive_d-1.1.0dev-py3.4.egg/onedrive_d/od_onedrive_api.py", line 648, in get
    raise OneDriveAPIException(ret)
onedrive_d.od_onedrive_api.OneDriveAPIException: The resource 'file.ac5fa58e2188598d.AC5FA58E2188598D!114073' doesn't exist. (resource_not_found)