You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to dbt/logger.py and now it works. (Not sure if this is the best solution though)
Expected Behavior
It should not get the recursion error.
Steps To Reproduce
git clone [email protected]:dbt-labs/jaffle_shop.git
cd jaffle_shop
pyenv local 3.10.1
python -m venv .venv
source .venv/bin/activate
pip install dbt-postgres
dbt run
Relevant log output
Traceback (most recent call last):
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/handlers.py", line 216, in handle
self.emit(record)
File "jaffle_shop/.venv/lib/python3.10/site-packages/dbt/logger.py", line 467, in emit
super().emit(record)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/handlers.py", line 836, in emit
msg = self.format(record)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/dbt/logger.py", line 454, in format
msg = super().format(record)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/handlers.py", line 195, in format
return self.formatter(record, self)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/handlers.py", line 387, in __call__
line = self.format_record(record, handler)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/handlers.py", line 371, in format_record
return self._formatter.format(record=record, handler=handler)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/helpers.py", line 283, in __get__
value = self.func(obj)
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/base.py", line 675, in thread_name
returnthread_get_name()
File "/jaffle_shop/.venv/lib/python3.10/site-packages/logbook/concurrency.py", line 141, in thread_get_name
returncurrentThread().getName()
File "/home/xx/.pyenv/versions/3.10.1/lib/python3.10/threading.py", line 1442, in currentThread
warnings.warn('currentThread() is deprecated, use current_thread() instead',RecursionError: maximum recursion depth exceeded
github-actionsbot
changed the title
[Bug] Logger throws recursion errors because of Deprecation Warnings
[CT-48] [Bug] Logger throws recursion errors because of Deprecation Warnings
Jan 17, 2022
When I do the same for https://github.com/mjirv/dbt-datamocktool it works without problems. However, when I repeat it for jaffle_shop it fails. Maybe this is an issue just on my side or with the jaffle_shop repo?
I believe this is a duplicate of #4537. dbt v1.0 does not officially support Python 3.10; we're looking to add support for it in v1.1 (#4562), which will require (at minimum) addressing the flood of deprecation warnings related to the legacy logger / logbook.
Until then, the official resolution will be to downgrade your Python version to 3.9 while using dbt.
Is there an existing issue for this?
Current Behavior
dbt debug
shows that everything is green. Then I runWhen running
dbt run
(orseed
ordeps
) I get a recursion error (see output section).Solution:
When I did some low key investigation it seems that this is triggered by deprecation warnings. I then took the liberty to add the line
to dbt/logger.py and now it works. (Not sure if this is the best solution though)
Expected Behavior
It should not get the recursion error.
Steps To Reproduce
Relevant log output
What database are you using dbt with?
postgres
Additional Context
No response
The text was updated successfully, but these errors were encountered: