derrix060 / onedriveClient

A Microsoft OneDrive and OneDrive for Business client for Linux, written in Python3.
MIT License
65 stars 10 forks source link

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

Open derrix060 opened 5 years ago

derrix060 commented 5 years ago

@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 https://github.com/derrix060/onedriveClient/issues/32#issuecomment-448981001

modelmat commented 5 years ago

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

derrix060 commented 5 years ago

Not yet. Fell free to work on this.