Closed daviddavo closed 6 years ago
Have you configured the settings inside any virtual enviroment? I only could reproduce it when I install inside a virtual env.
I just encountered this same issue as well, out of the blue. I don't know of any changes that could have been made to the Python installation since I started onedrived successfully last time. I even tried to make sure it does not run in any venv by calling Ubuntu 16.04's preinstalled system Python executable directly, but no difference.
Can this issue be reopened and possibly fixed, please? Or are there at least any workarounds to get it running again?
$ /usr/bin/python3.5 /usr/local/bin/onedrived start --debug
Starting onedrived ... OK
[2018-09-03 01:38:49,568] DEBUG: MainThread: Starting new HTTPS connection (1): login.microsoftonline.com
[2018-09-03 01:38:49,958] DEBUG: MainThread: https://login.microsoftonline.com:443 "POST /common/oauth2/token HTTP/1.1" 400 605
Traceback (most recent call last):
File "/usr/local/bin/onedrived", line 11, in <module>
load_entry_point('onedrived==2.0.0', 'console_scripts', 'onedrived')()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/daemonocle/cli.py", line 57, in subcommand
daemon.do_action(name)
File "/usr/local/lib/python3.5/dist-packages/daemonocle/core.py", line 608, in do_action
func()
File "/usr/local/lib/python3.5/dist-packages/daemonocle/core.py", line 477, in start
self._run()
File "/usr/local/lib/python3.5/dist-packages/daemonocle/core.py", line 399, in _run
self.worker()
File "/usr/local/lib/python3.5/dist-packages/onedrived/od_main.py", line 195, in main
all_accounts = get_repo_table(context)
File "/usr/local/lib/python3.5/dist-packages/onedrived/od_main.py", line 101, in get_repo_table
authenticator, drives = get_authenticator_and_drives(ctx, account_id)
File "/usr/local/lib/python3.5/dist-packages/onedrived/od_auth.py", line 45, in get_authenticator_and_drives
authenticator.refresh_session(account_id)
File "/usr/local/lib/python3.5/dist-packages/onedrived/od_auth.py", line 188, in refresh_session
self.client.auth_provider.refresh_token()
File "/usr/local/lib/python3.5/dist-packages/onedrivesdk/auth_provider.py", line 261, in refresh_token
data=params)
File "/usr/local/lib/python3.5/dist-packages/onedrivesdk/http_provider.py", line 71, in send
custom_response = HttpResponse(response.status_code, response.headers, response.text)
File "/usr/local/lib/python3.5/dist-packages/onedrivesdk/http_response.py", line 61, in __init__
raise Exception(str(message["error"]))
Exception: invalid_grant
[2018-09-03 01:38:50,182] DEBUG: Dummy-1: Close <_UnixSelectorEventLoop running=False closed=False debug=True>
All children are gone. Parent is exiting...
@ByteCommander Try with the new version 2.0.1. I believe it should work now. Unfortunately, you will have to configure your account again, because I add one more scope (offline access) and it needs to be validated on Microsoft.
@daviddavo can you please try too?
NOTE: now is possible to run this package inside a virtualenv. I just test it here, and is working...
pi@bpi-iot-ros-ai:~ $ onedrived start --debug
Starting onedrived ... OK
Please enter password for encrypted keyring:
[2018-09-14 18:46:49,024] DEBUG: MainThread: Starting new HTTPS connection (1): login.microsoftonline.com
[2018-09-14 18:46:49,820] DEBUG: MainThread: https://login.microsoftonline.com:443 "POST /common/oauth2/token HTTP/1.1" 200 2737
[2018-09-14 18:46:50,925] DEBUG: MainThread: Starting new HTTPS connection (1): ucomplutense-my.sharepoint.com
[2018-09-14 18:46:51,675] DEBUG: MainThread: https://ucomplutense-my.sharepoint.com:443 "GET /_api/v2.0/drives HTTP/1.1" 200 None
[2018-09-14 18:46:51,843] DEBUG: MainThread: Refreshing repository session.
[2018-09-14 18:46:51,856] DEBUG: MainThread: Starting new HTTPS connection (1): login.microsoftonline.com
[2018-09-14 18:46:52,426] DEBUG: MainThread: https://login.microsoftonline.com:443 "POST /common/oauth2/token HTTP/1.1" 200 2732
[2018-09-14 18:46:53,397] INFO: MainThread: Session for account 01DJ6EXAF6Y2GOVW7725BZO354PWSELRRZ will expire in 3598 seconds.
[2018-09-14 18:46:53,399] DEBUG: MainThread: Will refresh session in 3478 seconds.
[2018-09-14 18:46:54,153] INFO: MainThread: Sweeping onedrived temporary files from local repositories.
[2018-09-14 18:46:55,592] DEBUG: Worker-0: Started.
[2018-09-14 18:46:55,598] DEBUG: Worker-1: Started.
[2018-09-14 18:46:57,628] CRITICAL: MainThread: Error initializing webhook: Did not find API interface of ngrok.
[2018-09-14 18:46:57,649] INFO: MainThread: Shutting down. Code: Exiting with message: None.
[2018-09-14 18:46:57,720] INFO: Worker-0: Stopped.
[2018-09-14 18:46:57,723] INFO: Worker-1: Stopped.
[2018-09-14 18:46:57,740] INFO: MainThread: Shut down complete.
[2018-09-14 18:46:57,764] DEBUG: Dummy-1: Closing database "/home/pi/.config/onedrived/items_b!_EiJPDydBkqU9sAVU66liNsHLNtiyWxPu9itOHoimhEtGHvbwi1PTrnuIoBhJlgJ.sqlite3".
ngrok is installed on /usr/local/bin/ngrok
That's cool, looks like this issue has been fixed. Can you open another issue about the ngrok? I think I know what's going on...