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

TypeError: __new__() missing 1 required positional argument: 'ignorefile_path' #42

Open
derrix060 opened this issue Dec 20, 2018 · 2 comments
Assignees

Comments

@derrix060
Copy link
Owner

@derrix060 I followed your instructions above, and fixed the syntax error in od_auth.py. Various commands then gave the error:

TypeError: __new__() missing 1 required positional argument: 'ignorefile_path'

For example:

rodom@oe2134:~$ onedrive-client start --debug
Starting onedrive-client ... OK
[2018-12-20 11:56:58,552] DEBUG: MainThread: Starting new HTTPS connection (1): login.microsoftonline.com:443
[2018-12-20 11:56:58,806] DEBUG: MainThread: https://login.microsoftonline.com:443 "POST /common/oauth2/v2.0/token HTTP/1.1" 200 3235
[2018-12-20 11:56:58,919] DEBUG: MainThread: Starting new HTTPS connection (1): graph.microsoft.com:443
[2018-12-20 11:56:59,604] DEBUG: MainThread: https://graph.microsoft.com:443 "GET /v1.0/me/drives HTTP/1.1" 200 None
Traceback (most recent call last):
  File "/home/rodom/bin/onedrive-client", line 11, in <module>
    load_entry_point('onedriveClient==2.0.1', 'console_scripts', 'onedrive-client')()
  File "/home/rodom/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/rodom/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/rodom/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/rodom/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/rodom/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/rodom/.local/lib/python3.5/site-packages/daemonocle/cli.py", line 57, in subcommand
    daemon.do_action(name)
  File "/home/rodom/.local/lib/python3.5/site-packages/daemonocle/core.py", line 608, in do_action
    func()
  File "/home/rodom/.local/lib/python3.5/site-packages/daemonocle/core.py", line 477, in start
    self._run()
  File "/home/rodom/.local/lib/python3.5/site-packages/daemonocle/core.py", line 399, in _run
    self.worker()
  File "/home/rodom/.local/lib/python3.5/site-packages/onedrive_client/od_main.py", line 195, in main
    all_accounts = get_repo_table(context)
  File "/home/rodom/.local/lib/python3.5/site-packages/onedrive_client/od_main.py", line 103, in get_repo_table
    for d in drives if d.id in ctx.config['drives']]
  File "/home/rodom/.local/lib/python3.5/site-packages/onedrive_client/od_main.py", line 103, in <listcomp>
    for d in drives if d.id in ctx.config['drives']]
  File "/home/rodom/.local/lib/python3.5/site-packages/onedrive_client/od_context.py", line 159, in get_drive
    return _drive_config.LocalDriveConfig(**self.config['drives'][drive_id])
TypeError: __new__() missing 1 required positional argument: 'ignorefile_path'
[2018-12-20 11:56:59,696] DEBUG: Dummy-1: Close <_UnixSelectorEventLoop running=False closed=False debug=True>
All children are gone. Parent is exiting...

This was also seen on onedrive-client-pref drive set. On investigation it was because my existing config file ~/.config/onedrive_client/onedrive_client_config_v2.json was missing the ignorefile_path key under drives - adding it manually to the file allowed onedrive-client to start. However, shouldn't the code be tolerant of this being missing?

Originally posted by @RodoM in #32 (comment)

@modelmat
Copy link
Collaborator

modelmat commented Feb 9, 2019

Has this been fixed yet? I'd be willing to PR a fix.

@derrix060
Copy link
Owner Author

Not yet. Fell free to work on this.

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