drive-cli
drive-cli copied to clipboard
TypeError: '<' not supported between instances of 'dict' and 'float'
Added print statement to see what is happening.. push_needed is called twice once each time with different time:
drive push checking for changes in 'reconstruction' .... sync_time 1591028556.5466192 local_time 1591008755.5294328 sync_time {'time': 1591084154.9402184} local_time 1591064351.205921 Traceback (most recent call last):
sync_time seems to be assigned a dictionary rather than a value in drive push. drive status runs ok and reports files to push but drive push fails with the following error:
drive push checking for changes in 'reconstruction' .... Traceback (most recent call last): File "/home/peter.iabra/.local/bin/drive", line 11, in <module> load_entry_point('drive-cli', 'console_scripts', 'drive')() File "/home/peter.iabra/.local/lib/python3.8/site-packages/Click-7.0-py3.8.egg/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/home/peter.iabra/.local/lib/python3.8/site-packages/Click-7.0-py3.8.egg/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/peter.iabra/.local/lib/python3.8/site-packages/Click-7.0-py3.8.egg/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/peter.iabra/.local/lib/python3.8/site-packages/Click-7.0-py3.8.egg/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/peter.iabra/.local/lib/python3.8/site-packages/Click-7.0-py3.8.egg/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/peter.iabra/localbuilds/drive-cli/drive_cli/actions.py", line 311, in push utils.push_content(cwd, fid) File "/home/peter.iabra/localbuilds/drive-cli/drive_cli/utils.py", line 494, in push_content if(push_needed(drive_lis[item], item_path)): File "/home/peter.iabra/localbuilds/drive-cli/drive_cli/utils.py", line 173, in push_needed if sync_time < local_time: TypeError: '<' not supported between instances of 'dict' and 'float'
fixed with the following patch ``def push_needed(drive, item_path):
...
if isinstance(sync_time, dict):
sync_time = sync_time['time']
if sync_time < local_time:
``
This has led to some strange behaviour. I have a folder with several files A, B, C, D, which are all tracked. After I change one file, say C, and run drive push
, the content of C is saved to file A, and the rest of the files remain unchanged on the remote. This is quite worrying, but it appears that this repo is no longer maintained. Some pull requests look quite promising (#95) and it would be a shame if this project was just abandoned. Is anyone willing to take over maintenance?