asweigart/ezsheets

Can't initiate OAuth consent screen

Opened this issue · 0 comments

Problem

If on line 1798 and 1819 in the following code: creds = flow.run_local_server(), port=0 is not passed as argument it gives error:

PermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

365290956-2956ecfc-2a89-4d8c-86a3-5f349afc455a

Fix:

creds = flow.run_local_server(port=0)

Tip:
Use a function to reuse the OAuth code snippet for sheets and drive api