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

Fix error when calling enable_debug_mode twice #1687

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Fix error when calling enable_debug_mode twice #1687

merged 1 commit into from
Sep 19, 2023

Conversation

arduinocc04
Copy link
Contributor

When call enable_debug_mode twice, It makes error.

Traceback (most recent call last):
  File "/home/arduinocc04/Documents/GitHub/yfinance/test_yfinance.py", line 75, in <module>
    yf.enable_debug_mode()
  File "/home/arduinocc04/Documents/GitHub/yfinance/yfinance/utils.py", line 185, in enable_debug_mode
    setup_debug_formatting()
  File "/home/arduinocc04/Documents/GitHub/yfinance/yfinance/utils.py", line 172, in setup_debug_formatting
    if yf_logger.handlers is None or len(yf_logger.handlers) == 0:
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'IndentLoggerAdapter' object has no attribute 'handlers'. Did you mean: 'hasHandlers'?

This error is so annoying when using jupyter and rerun code block.

@ValueRaider ValueRaider merged commit 279726a into ranaroussi:dev Sep 19, 2023
@ValueRaider ValueRaider mentioned this pull request Sep 22, 2023
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 this pull request may close these issues.

2 participants