onenote_export icon indicating copy to clipboard operation
onenote_export copied to clipboard

Missing Access Token

Open barddzen opened this issue 4 years ago • 3 comments

ValueError ValueError: Missing access token.

Traceback (most recent call last) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2464, in call return self.wsgi_app(environ, start_response) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1867, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "/Users/administrator/onenote_export/onenote_export.py", line 236, in main_logic download_notebooks(graph_client, app.config['output_path'], app.config['select_path'], indent=0) File "/Users/administrator/onenote_export/onenote_export.py", line 166, in download_notebooks notebooks = get_json(graph_client, f'{graph_url}/me/onenote/notebooks') File "/Users/administrator/onenote_export/onenote_export.py", line 60, in get_json resp = get(graph_client, next_page, params=params, indent=indent).json() File "/Users/administrator/onenote_export/onenote_export.py", line 70, in get resp = graph_client.get(url, params=params) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests_oauthlib/oauth2_session.py", line 478, in request url, http_method=method, body=data, headers=headers File "/usr/local/lib/python3.7/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 195, in add_token raise ValueError("Missing access token.") ValueError: Missing access token. The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame dump(obj) dumps all that's known about the object Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

barddzen avatar Nov 22 '20 02:11 barddzen

Barddzen

I had the same response when I used the secret 'ID' entry from the azure page. Using the 'value' secret worked on the initial setup.

I also get the same when I've been downloading for a while and get the TokenExpiredError. The refresh of the local page does not force a new token in Safari (ver 14.0.3), however clicking the back button will restart things as it then reloads the original "Are you trying to sign... click Continue" page.

Hope this helps/works for you until Danmou has time to look into it.

ghost avatar Feb 06 '21 00:02 ghost

Barddzen

I had the same response when I used the secret 'ID' entry from the azure page. Using the 'value' secret worked on the initial setup.

I also get the same when I've been downloading for a while and get the TokenExpiredError. The refresh of the local page does not force a new token in Safari (ver 14.0.3), however clicking the back button will restart things as it then reloads the original "Are you trying to sign... click Continue" page.

Hope this helps/works for you until Danmou has time to look into it.

Thank you,you are right!

xiaoyaofengyuxing avatar Jun 29 '21 12:06 xiaoyaofengyuxing

kevindurston21

Thank you for your help! It worked for me too

Gwihwan-Go avatar Jul 12 '22 02:07 Gwihwan-Go