Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly generated pipeline fails with ImportError: cannot import name 'OAuth2ClientCredentials' #130

Open
joscha opened this issue Nov 20, 2024 · 2 comments · May be fixed by #131
Open

Newly generated pipeline fails with ImportError: cannot import name 'OAuth2ClientCredentials' #130

joscha opened this issue Nov 20, 2024 · 2 comments · May be fixed by #131

Comments

@joscha
Copy link

joscha commented Nov 20, 2024

A freshly generated pipeline with:

dlt-init-openapi affinity --url https://raw.githubusercontent.com/planet-a-ventures/affinity-node/refs/heads/main/openapi/2024-11-18.json --global-limit 2

yields

Traceback (most recent call last):
  File "/Users/joscha/dev/dlt-test/affinity_pipeline/affinity_pipeline.py", line 3, in <module>
    from affinity import affinity_source
  File "/Users/joscha/dev/dlt-test/affinity_pipeline/affinity/__init__.py", line 5, in <module>
    from rest_api import rest_api_source
  File "/Users/joscha/dev/dlt-test/affinity_pipeline/rest_api/__init__.py", line 39, in <module>
    from .config_setup import (
  File "/Users/joscha/dev/dlt-test/affinity_pipeline/rest_api/config_setup.py", line 47, in <module>
    from dlt.sources.helpers.rest_client.auth import (
ImportError: cannot import name 'OAuth2ClientCredentials' from 'dlt.sources.helpers.rest_client.auth' (/Users/joscha/dev/dlt-test/.devenv/state/venv/lib/python3.11/site-packages/dlt/sources/helpers/rest_client/auth.py)

on running the pipeline. Possibly related to an outdated dlt version?

@joscha
Copy link
Author

joscha commented Nov 20, 2024

Upgrading dlt is not as straightforward as hoped: #127 (comment)

@joscha
Copy link
Author

joscha commented Nov 20, 2024

Changing the requirements.txt to dlt>=0.5.2, <1 seems to resolve this issue.

joscha added a commit to joscha/dlt-init-openapi that referenced this issue Nov 20, 2024
@joscha joscha linked a pull request Nov 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant