Python reads the configuration file. Ini and resolves the error

Python reads the configuration file. Ini and reports an error raise nosectionerror (section) from none configparser. Nosectionerror: no section: ‘log’

My profile:


read profile code:
from configparser import configparser

1. Instantiate the configparser class

conf = ConfigParser()

2. Read configuration file

conf.read(“conf_ini”,encoding=‘utf-8’)

3. Read a configuration value: get, all of which are strings

Value = conf.get (‘log ‘, “name”)
error after running:
raise nosectionerror (section) from none
configparser. Nosectionerror: no section:’ log ‘
reason: the. Ini configuration file is not read
solution:
fill in the absolute path directly

Read More: