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
Describe the bug
The import of NotificationHandler from notifiers.logging is blocking my code, the entire script is stuck on that part and if i do Ctrl + C then the script gets killed with stacktrace showing that it is stuck in that line, if i comment it out from imports all works well.
File "server.py", line 10, in
from notifiers.logging import NotificationHandler
File "/home/nvidia/.local/lib/python3.8/site-packages/notifiers/init.py", line 4, in
from .core import all_providers
File "/home/nvidia/.local/lib/python3.8/site-packages/notifiers/core.py", line 13, in
from .utils.helpers import dict_from_environs
File "/home/nvidia/.local/lib/python3.8/site-packages/notifiers/utils/helpers.py", line 3, in
from distutils.util import strtobool
File "", line 991, in _find_and_load
File "", line 971, in _find_and_load_unlocked
File "", line 914, in _find_spec
File "/usr/local/lib/python3.8/dist-packages/_distutils_hack/init.py", line 97, in find_spec
return method()
File "/usr/local/lib/python3.8/dist-packages/_distutils_hack/init.py", line 108, in spec_for_distutils
mod = importlib.import_module('setuptools._distutils')
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.8/dist-packages/setuptools/init.py", line 16, in
from .dist import Distribution
File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 27, in
from .extern.packaging.markers import InvalidMarker, Marker
File "/usr/local/lib/python3.8/dist-packages/setuptools/_vendor/packaging/markers.py", line 11, in
from ._parser import (
File "/usr/local/lib/python3.8/dist-packages/setuptools/_vendor/packaging/_parser.py", line 10, in
from ._tokenizer import DEFAULT_RULES, Tokenizer
File "/usr/local/lib/python3.8/dist-packages/setuptools/_vendor/packaging/_tokenizer.py", line 6, in
from .specifiers import Specifier
File "/usr/local/lib/python3.8/dist-packages/setuptools/_vendor/packaging/specifiers.py", line 26, in
from .utils import canonicalize_version
File "/usr/local/lib/python3.8/dist-packages/setuptools/_vendor/packaging/utils.py", line 8, in
from .tags import Tag, parse_tag
File "/usr/local/lib/python3.8/dist-packages/setuptools/_vendor/packaging/tags.py", line 26, in
logger = logging.getLogger(name)
File "/usr/lib/python3.8/logging/init.py", line 2025, in getLogger
return Logger.manager.getLogger(name)
File "/usr/lib/python3.8/logging/init.py", line 1298, in getLogger
_acquireLock()
File "/usr/lib/python3.8/logging/init.py", line 225, in _acquireLock
_lock.acquire()
KeyboardInterrupt
^C
To Reproduce
Expected behavior
Import the library as soon as possible and not block the execution of the code.
This seems unrelated to notifiers and very much related to the logging module. Can you show your code on how you call from notifiers.logging import NotificationHandler?
Also, do you have issues when using other logging handlers?
Describe the bug
The import of NotificationHandler from notifiers.logging is blocking my code, the entire script is stuck on that part and if i do Ctrl + C then the script gets killed with stacktrace showing that it is stuck in that line, if i comment it out from imports all works well.
To Reproduce
Expected behavior
Import the library as soon as possible and not block the execution of the code.
Additional context
Python version: 3.8
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered: