-
Notifications
You must be signed in to change notification settings - Fork 216
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
Invalid format timestamp #62
Comments
Hi @balagpy |
Thanks for the reply @shivankar-madaan - Let me try on python 2.7 |
Hi @shivankar-madaan tried in python 2.7, but it throwing the following error cs-suite$ sudo python cs.py |
Hi @balagpy Do let me know if it works |
Installed python-JSON-logger module Traceback (most recent call last): |
@balagpy have you set the AWS keys on the cli? |
@shivankar-madaan Yes, configured aws keys on the cli. |
@balagpy what output are you getting for "aws iam list-account-aliases" |
I worked around this error by adding the validate=False parameter to the CustomJsonFormatter in modules/logger.py formatter = CustomJsonFormatter('(timestamp) (level) (name) (message)',validate=False) I have tested this on Python 3.8 after pulling from https://github.com/almoore/cs-suite |
Hi Team,
I am facing the following error, pls help me..
(venv) ubuntu@ip:~/cs-suite$ python3 cs.py -env aws
Traceback (most recent call last):
File "cs.py", line 6, in
from modules import logger
File "/home/ubuntu/cs-suite/modules/logger.py", line 17, in
formatter = CustomJsonFormatter('(timestamp) (level) (name) (message)')
File "/home/ubuntu/cs-suite/venv/lib/python3.8/site-packages/pythonjsonlogger/jsonlogger.py", line 115, in init
logging.Formatter.init(self, *args, **kwargs)
File "/usr/lib/python3.8/logging/init.py", line 576, in init
self._style.validate()
File "/usr/lib/python3.8/logging/init.py", line 429, in validate
raise ValueError("Invalid format '%s' for '%s' style" % (self._fmt, self.default_format[0]))
ValueError: Invalid format '(timestamp) (level) (name) (message)' for '%' style
The text was updated successfully, but these errors were encountered: