Open balagpy opened 3 years ago
Hi @balagpy The current tool is un-tested on python3 Could you possibly give a try with python 2.7?
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
Traceback (most recent call last):
File "cs.py", line 6, in
Hi @balagpy were you able to run setup.py or install all the requirements from requirement.txt or could you try installing python-json-logger module of python
Do let me know if it works
Installed python-JSON-logger module after getting this error @shivankar-madaan
Traceback (most recent call last):
File "cs.py", line 117, in
@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" You don't need to share the output, but is it in json or empty?
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