You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using a backup script which used the live_api used in an older version of onedrive-d. Using this script, I uploaded all the files in a specific folder.
I am in the process of updating this script of mine to work use onedrivesdk. However, I noticed that the sdk has some issues when I try to check the last_modified_date_time of the files I have already uploaded. The traceback looks as follows:
Traceback (most recent call last):
File "<ipython-input-24-f4000242bd12>", line 1, in <module>
debugfile('F:/IWU/Python_new/OneDriveUpdate.py', wdir='F:/IWU/Python_new')
File "F:\Software\WinPython\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 808, in debugfile
debugger.run("runfile(%r, args=%r, wdir=%r)" % (filename, args, wdir))
File "F:\Software\WinPython\python-3.4.3.amd64\lib\bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "F:\Software\WinPython\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 786, in runfile
execfile(filename, namespace)
File "F:\Software\WinPython\python-3.4.3.amd64\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 87, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "f:/iwu/python_new/onedriveupdate.py", line 532, in <module>
if not checkDirContent(rootDir, upDirID, posFilter):
File "f:/iwu/python_new/onedriveupdate.py", line 262, in checkDirContent
if not checkDirContent(localItem['path'], dirID, None, (localItem['name'] == 'Zotero'), (defaultDelete and localItem['name'] == 'storage')):
File "f:/iwu/python_new/onedriveupdate.py", line 262, in checkDirContent
if not checkDirContent(localItem['path'], dirID, None, (localItem['name'] == 'Zotero'), (defaultDelete and localItem['name'] == 'storage')):
File "f:/iwu/python_new/onedriveupdate.py", line 262, in checkDirContent
if not checkDirContent(localItem['path'], dirID, None, (localItem['name'] == 'Zotero'), (defaultDelete and localItem['name'] == 'storage')):
File "f:/iwu/python_new/onedriveupdate.py", line 284, in checkDirContent
ulFileTimeDT = file.last_modified_date_time
File "F:\Software\WinPython\python-3.4.3.amd64\lib\site-packages\onedrivesdk\model\item.py", line 196, in last_modified_date_time
return datetime.strptime(self._prop_dict["lastModifiedDateTime"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f")
File "F:\Software\WinPython\python-3.4.3.amd64\lib\_strptime.py", line 500, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "F:\Software\WinPython\python-3.4.3.amd64\lib\_strptime.py", line 337, in _strptime
(data_string, format))
ValueError: time data '2014-11-05T11:47:34' does not match format '%Y-%m-%dT%H:%M:%S.%f'
Note the missing microseconds. For the time being I am simply using a try/except to default to the 1970/1/1. Anyhow, I do not know what causes the time to be weird/not like expected. I assume this is either an issue on the server side (bad truncation if microseconds==0?) or an issue in the sdk which should be caught on your end. It would be awesome if you could attend to the matter.
Regards,
Stulle
The text was updated successfully, but these errors were encountered:
Hi,
I have been using a backup script which used the live_api used in an older version of onedrive-d. Using this script, I uploaded all the files in a specific folder.
I am in the process of updating this script of mine to work use onedrivesdk. However, I noticed that the sdk has some issues when I try to check the last_modified_date_time of the files I have already uploaded. The traceback looks as follows:
Note the missing microseconds. For the time being I am simply using a try/except to default to the 1970/1/1. Anyhow, I do not know what causes the time to be weird/not like expected. I assume this is either an issue on the server side (bad truncation if microseconds==0?) or an issue in the sdk which should be caught on your end. It would be awesome if you could attend to the matter.
Regards,
Stulle
The text was updated successfully, but these errors were encountered: