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

[Bug] No module named 'tenacity.asyncio' when running dbt-athena #671

Closed
2 tasks done
t04glovern opened this issue Jun 17, 2024 · 3 comments
Closed
2 tasks done

[Bug] No module named 'tenacity.asyncio' when running dbt-athena #671

t04glovern opened this issue Jun 17, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@t04glovern
Copy link

Is this a new bug in dbt-athena?

  • I believe this is a new bug in dbt-athena
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

08:05:33  Running with dbt=1.7.11
08:05:33  Encountered an error:
No module named 'tenacity.asyncio'
08:05:33  Traceback (most recent call last):
...
...
...
  File "/home/runner/.local/lib/python3.10/site-packages/dbt/adapters/athena/__init__.py", line 2, in <module>
    from dbt.adapters.athena.connections import AthenaConnectionManager, AthenaCredentials
  File "/home/runner/.local/lib/python3.10/site-packages/dbt/adapters/athena/connections.py", line 12, in <module>
    import tenacity
  File "/home/runner/.local/lib/python3.10/site-packages/tenacity/__init__.py", line 653, in <module>
    from tenacity.asyncio import AsyncRetrying  # noqa:E402,I100
ModuleNotFoundError: No module named 'tenacity.asyncio'

The issue is due to a breaking change in jd/tenacity#471, which is automatically installed due to the dependency on tenacity~=8.2 - which equates to tenacity>=8.*

Hopefully this problem will be resolved with a release of version 8.5 which will automatically be used by this repository https://github.com/dbt-athena/dbt-athena/blob/main/setup.py#L62

Expected Behavior

Queries should run - this is not a bug with dbt-athena specifically, though, so nothing should tangably change with this library.

Steps To Reproduce

  1. Install dbt-athena (any version where the tenacity~=8.2 is defined in the setup.py)
  2. Run any dbt job

Environment

- OS: Ubuntu 22.04
- Python: 3.10
- dbt: 1.7.11
- dbt-athena-community: 1.7.2

Additional Context

No response

@t04glovern t04glovern added the bug Something isn't working label Jun 17, 2024
@nicor88
Copy link
Contributor

nicor88 commented Jun 17, 2024

@t04glovern looks like that the fix is simple as installing forcing the installation of "tenacity~=8.3" here
https://github.com/dbt-athena/dbt-athena/blob/main/setup.py#L62.
Feel free to propose a fix for it, otherwise I will take care of it in the next days.

Also, as you might have done already, you can force the installation of "tenacity~=8.3" in your python env, and that should fix the issue as well as a workaround.

@nicor88 nicor88 added the good first issue Good for newcomers label Jun 17, 2024
@CommonCrisis
Copy link
Contributor

This is fixed with 8.4.1: jd/tenacity#475 (comment)

@CommonCrisis
Copy link
Contributor

Pretty sure this can be closed

@nicor88 nicor88 closed this as completed Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants