GoogleDriveLoader: AttributeError: 'Credentials' object has no attribute 'with_scopes'
Labels: name: auto:bug

### System Info

Macbook OSX
Python 3.11.4 (main, Jun 25 2023, 18:18:14) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
LangChain Environment:
sdk_version:0.0.17
library:langchainplus_sdk
platform:macOS-13.3.1-arm64-arm-64bit
runtime:python
runtime_version:3.11.4

I'm getting this error, and no matter what configurations I try, I cannot get past it.

```
AttributeError: 'Credentials' object has no attribute 'with_scopes'
```

My abbreviated code snippet:

```
from langchain.document_loaders import GoogleDriveLoader
loader = GoogleDriveLoader(
    folder_id="xxxx",    recursive=True,
)

docs = loader.load()
```

```
cat ~/.credentials/credentials.json
{
  "installed": {
    "client_id": "xxxxxxxxx.apps.googleusercontent.com",
    "project_id": "xxxxxxxxx",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_secret": "xxxxxxxxx",
    "redirect_uris": [
      "http://localhost"
    ]
  }
}
```

```
#gcloud info

Google Cloud SDK [437.0.1]

Platform: [Mac OS X, arm] uname_result(system='Darwin', node='xxxxs-MBP-3', release='22.4.0', version='Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000', machine='arm64')
Locale: (None, 'UTF-8')
Python Version: [3.11.4 (main, Jun 25 2023, 18:18:14) [Clang 14.0.3 (clang-1403.0.22.14.1)]]
Python Location: [/Users/xxxx/.asdf/installs/python/3.11.4/bin/python3]
OpenSSL: [OpenSSL 1.1.1u  30 May 2023]
Requests Version: [2.25.1]
urllib3 Version: [1.26.9]
Default CA certs file: [/Users/xxxx/google-cloud-sdk/lib/third_party/certifi/cacert.pem]
Site Packages: [Disabled]

Installation Root: [/Users/xxxx/google-cloud-sdk]
Installed Components:
  gsutil: [5.24]
  core: [2023.06.30]
  bq: [2.0.93]
  gcloud-crc32c: [1.0.0]
System PATH: [/Users/xxxx/.asdf/plugins/python/shims:/Users/xxxx/.asdf/installs/python/3.11.4/bin:/Users/xxxx/.rvm/gems/ruby-3.0.3/bin:/Users/xxxx/.rvm/gems/ruby-3.0.3@global/bin:/Users/xxxx/.rvm/rubies/ruby-3.0.3/bin:/Users/xxxx/.rvm/bin:/Users/xxxx/google-cloud-sdk/bin:/Users/xxxx/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/Users/xxxx/.sdkman/candidates/gradle/current/bin:/Users/xxxx/.jenv/shims:/Users/xxxx/.jenv/bin:/Users/xxxx/.nvm/versions/node/v17.6.0/bin:/opt/homebrew/opt/mysql@5.7/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/xxxx/Library/Android/sdk/emulator:/Users/xxxx/Library/Android/sdk/platform-tools]
Python PATH: [/Users/xxxx/google-cloud-sdk/lib/third_party:/Users/xxxx/google-cloud-sdk/lib:/Users/xxxx/.asdf/installs/python/3.11.4/lib/python311.zip:/Users/xxxx/.asdf/installs/python/3.11.4/lib/python3.11:/Users/xxxx/.asdf/installs/python/3.11.4/lib/python3.11/lib-dynload]
Cloud SDK on PATH: [True]
Kubectl on PATH: [/usr/local/bin/kubectl]

Installation Properties: [/Users/xxxx/google-cloud-sdk/properties]
User Config Directory: [/Users/xxx/.config/gcloud]
Active Configuration Name: [default]
Active Configuration Path: [/Users/xxxx/.config/gcloud/configurations/config_default]

Account: [xxxxxx@xxx.com]
Project: [project-name-replaced]

Current Properties:
  [compute]
    zone: [europe-west1-b] (property file)
    region: [europe-west1] (property file)
  [core]
    account: [xxxxxx@xxx.com] (property file)
    disable_usage_reporting: [True] (property file)
    project: [project-name-replaced] (property file)

Logs Directory: [/Users/xxx/.config/gcloud/logs]
Last Log File: [/Users/xxx/.config/gcloud/logs/xxxx.log]

git: [git version 2.39.2]
ssh: [OpenSSH_9.0p1, LibreSSL 3.3.6]
```



### Who can help?

@eyurtsev I think?

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [X] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

It's happening with a base app, nothing special. Using this template:

https://github.com/hwchase17/langchain-streamlit-template

### Expected behavior

Expected to get the oAuth window?