Open xwind-h opened 1 week ago
Hey @xwind-h! I'm here to help you with any bugs, questions, or contributions you have for GoogleDocsReader. Let's tackle this together!
The issue you're encountering with the redirect_uri_mismatch
error in the GoogleDocsReader
class is due to a mismatch between the port used in the code and the port specified in the redirect URI. The code uses port=0
, which allows the operating system to select an available port automatically, while the redirect URI is set to http://localhost:8080/
in the documentation.
To resolve this, you should modify the code to use port=8080
to match the redirect URI specified in your Google Cloud Console settings. Update the line in your code to:
creds = flow.run_local_server(port=8080)
This change should align the port used by the local server with the one specified in the redirect URI, resolving the mismatch error.
To continue talking to Dosu, mention @dosu.
Bug Description
GoogleDocsReader uses port=0 to run local server:
creds = flow.run_local_server(port=0)
but the redirect uri is set to http://localhost:8080/ (mentioned in the document)
I think the code should be:
creds = flow.run_local_server(port=8080)
Version
0.11.11
Steps to Reproduce
GoogleDocsReader().load_data(document_ids=['xxx'])
Relevant Logs/Tracbacks
No response