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
I am trying to setup the logging in my Django app. and some how its throwing me the
TypeError: init() got an unexpected keyword argument 'boto3_client'
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
/Users/bkaushik/Desktop/devel/qurx/api/REST/settings/local.py changed, reloading.
/Users/bkaushik/Desktop/devel/qurx/api/REST/../api/templates
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
/Users/bkaushik/Desktop/devel/qurx/api/REST/settings/local.py changed, reloading.
/Users/bkaushik/Desktop/devel/qurx/api/REST/../api/templates
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
/Users/bkaushik/Desktop/devel/qurx/api/REST/settings/local.py changed, reloading.
/Users/bkaushik/Desktop/devel/qurx/api/REST/../api/templates
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
The text was updated successfully, but these errors were encountered:
I am trying to setup the logging in my Django app. and some how its throwing me the
TypeError: init() got an unexpected keyword argument 'boto3_client'
Unable to figure out what am I missing here.
import boto3
boto3_logs_client = boto3.client("logs", region_name=AWS_REGION)
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"aws": {
"format": "%(asctime)s [%(levelname)-8s] %(message)s [%(pathname)s:%(lineno)d]",
"datefmt": "%Y-%m-%d %H:%M:%S",
},
},
"handlers": {
"watchtower": {
"level": "INFO",
'class': 'watchtower.CloudWatchLogHandler',
"boto3_client": boto3_logs_client,
"log_group": "my-app-logs",
"stream_name": f"app-logs",
"formatter": "aws",
},
"console": {
"class": "logging.StreamHandler",
"formatter": "aws",
},
},
"loggers": {
"watchtower": {
"level": "INFO",
"handlers": ["watchtower"],
"propogate": False,
}
},
}
full error:
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
/Users/bkaushik/Desktop/devel/qurx/api/REST/settings/local.py changed, reloading.
/Users/bkaushik/Desktop/devel/qurx/api/REST/../api/templates
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
/Users/bkaushik/Desktop/devel/qurx/api/REST/settings/local.py changed, reloading.
/Users/bkaushik/Desktop/devel/qurx/api/REST/../api/templates
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
/Users/bkaushik/Desktop/devel/qurx/api/REST/settings/local.py changed, reloading.
/Users/bkaushik/Desktop/devel/qurx/api/REST/../api/templates
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 744, in configure_handler
result = factory(**kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/watchtower/init.py", line 129, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'boto3_client'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/miniconda3/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
autoreload.raise_last_exception()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
raise _exception[1]
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/core/management/init.py", line 375, in execute
autoreload.check_errors(django.setup)()
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/init.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
File "/Users/bkaushik/Desktop/devel/qurx/venv-develop/lib/python3.8/site-packages/django/utils/log.py", line 75, in configure_logging
logging_config_func(logging_settings)
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "/opt/miniconda3/lib/python3.8/logging/config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'watchtower'
The text was updated successfully, but these errors were encountered: