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

Syncing from web to local onOneDrive for Business #21

Open
modelmat opened this issue Sep 29, 2018 · 9 comments
Open

Syncing from web to local onOneDrive for Business #21

modelmat opened this issue Sep 29, 2018 · 9 comments
Assignees
Labels

Comments

@modelmat
Copy link
Collaborator

modelmat commented Sep 29, 2018

Deleting/creating an item from the web client results in the error below, failing the delete/create The value for KeyError varies within 1000-7000 (from what I've seen). Fine deleting / creating files on local and uploading. The initial sync worked, just later updates do not. This makes this program useless.

also should I be worried when --debug shows a large amount of adding watcher for {file}?

source_traceback: Object created at (most recent call last):
  File "/home/modelmat/.local/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/modelmat/.local/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/modelmat/.local/lib/python3.7/site-packages/daemonocle/cli.py", line 57, in subcommand
    daemon.do_action(name)
  File "/home/modelmat/.local/lib/python3.7/site-packages/daemonocle/core.py", line 608, in do_action
    func()
  File "/home/modelmat/.local/lib/python3.7/site-packages/daemonocle/core.py", line 477, in start
    self._run()
  File "/home/modelmat/.local/lib/python3.7/site-packages/daemonocle/core.py", line 399, in _run
    self.worker()
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrived/od_main.py", line 204, in main
    context.watcher = LocalRepositoryWatcher(task_pool=task_pool, loop=context.loop)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrived/od_watcher.py", line 46, in __init__
    self.loop.add_reader(self.notifier.fd, self.process_events)
  File "/usr/lib/python3.7/asyncio/selector_events.py", line 335, in add_reader
    return self._add_reader(fd, callback, *args)
  File "/usr/lib/python3.7/asyncio/selector_events.py", line 260, in _add_reader
    handle = events.Handle(callback, args, self, None)
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrived/od_watcher.py", line 441, in process_events
    self.handle_event(ev, flags, move_pairs)
  File "/home/modelmat/.local/lib/python3.7/site-packages/onedrived/od_watcher.py", line 339, in handle_event
    repo, parent_dir = self.watch_descriptors[ev.wd]
  File "/home/modelmat/.local/lib/python3.7/site-packages/bidict/_common.py", line 96, in proxy
    return meth(*args)
KeyError: 8924
[2018-09-29 16:28:38,563] WARNING: MainThread: Executing <Handle LocalRepositoryWatcher.process_events() created at /usr/lib/python3.7/asyncio/selector_events.py:260> took 0.205 seconds
127.0.0.1 - - [29/Sep/2018 16:28:45] "POST /90VCNElMDu HTTP/1.1" 200 -
[2018-09-29 16:28:45,603] INFO: Webhook: b'POST /90VCNElMDu HTTP/1.1\r\n'
@derrix060
Copy link
Owner

That's weird because I use it every day and is working fine here... I'm wondering if can be something related with python3.7...

Anyway, I will look a this.

The number of " adding watcher for {file}" will depend on your configuration. You can see it on the onedrived_config_v2.json.

@modelmat
Copy link
Collaborator Author

So that's normal when in debug? Great!
Thanks for having a look. If you need anything tested, I know my way around python so it should be fine.

@derrix060
Copy link
Owner

derrix060 commented Oct 1, 2018

I could reproduce it here. What I've found is the program logs this error, but the file/directory is created/deleted...

The program can take some time (depend of your configuration) to sync, so don't expect to delete a file remotely and see sync so fast.

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 1, 2018

So it works but it errors?

@derrix060
Copy link
Owner

As far I could test here it's working okay but I will take a deep look and will remove any bugs. This piece was edited one year ago is likely to have a bug there..

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 1, 2018

Oh, okay.

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 3, 2018

I've had a look at this again and it seems that this only occurs when I create a file with one name then (very) quickly rename it, then it spams the KeyError continuously. If it's not so quick it only does the KeyError once.

@derrix060
Copy link
Owner

So even with the KeyError the sync could be completed?

@modelmat
Copy link
Collaborator Author

modelmat commented Oct 9, 2018

I'm not really sure. I think for doing it once it uploads, but for multiple (with unpaired watch events) it doesn't.

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

No branches or pull requests

2 participants