Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seems to break when cancelled halfway through initial sync #4

Open
modelmat opened this issue Sep 30, 2018 · 5 comments
Open

Seems to break when cancelled halfway through initial sync #4

modelmat opened this issue Sep 30, 2018 · 5 comments

Comments

@modelmat
Copy link

my computer crashed halfway through a running (2.5+hours ) sync, when attempting this happens:

 ✘  ~  python -m onedrive
INFO:root:Retrieving cloud tree structure
INFO:root:Cloud tree structure retrieved successfully
INFO:root:Loading previous state from database
INFO:root:Previous state loaded successfully
INFO:root:Parsing local tree structure
INFO:root:Local tree structure parsed successfully
INFO:root:Comparing trees and generating operations
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/__main__.py", line 21, in <module>
    main()
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/cli.py", line 84, in main
    return sync(SyncDirection.TWO_WAY)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/sync.py", line 82, in sync
    cloud_final = field_test(cloud_tree, local_script)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/algorithms.py", line 323, in field_test
    raise Exception('Failed in testing operation ' + repr(line))
Exception: Failed in testing operation AddDir(parent_id='0137ANOXN6Y2GOVW7725BZO354PWSELRRZ', child_id='0137ANOXK4ME76PDTPZNFLTJHBZKCLVC5N', name='Desktop')
@modelmat
Copy link
Author

Some possible solutions for this:

  • support previously synced dirs (test hashes of files & replace, then add extra files)
  • ??

@gzxu
Copy link
Owner

gzxu commented Sep 30, 2018

There are uni-directional syncing modes as fallback https://github.com/gzxu/onedrive-sync-client/blob/master/onedrive/cli.py#L31, just run onedrive --download-only; wish it might help

@modelmat
Copy link
Author

I'll have a go at these tomorrow, thanks for the help.

@modelmat modelmat reopened this Oct 1, 2018
@modelmat
Copy link
Author

modelmat commented Oct 1, 2018

The download-only reults in:

 ✘  ~  python -m onedrive --download-only
INFO:root:Retrieving cloud tree structure
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/__main__.py", line 21, in <module>
    main()
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/cli.py", line 80, in main
    return sync(SyncDirection.DOWNLOAD_ONLY)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/sync.py", line 50, in sync
    cloud_tree = retrieve_delta(sdk_session)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrive/sdk.py", line 275, in retrieve_delta
    response = session.get(url)
AttributeError: 'Session' object has no attribute 'get'

@gzxu
Copy link
Owner

gzxu commented Oct 2, 2018

That's weird again. Session::get() has been called previously in line 247 or line 263, but the AttributeError wasn't raised. I will dig into it when I am not busy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants