logging.basicConfig(filename='example.log', level=logging.DEBUG, encoding='utf-8')
When I try the above code I get this error
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 2009, in basicConfig
raise ValueError('Unrecognised argument(s): %s' % keys)
ValueError: Unrecognised argument(s): encoding
I tried going through the docs only to find that encoding is a valid argument for basicConfig().
Can someone explain?
New contributor
prat2194 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.