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:
- Solutions to errors reported by running pytest.ini configuration file
- python reads csv file is an error _csv.Error: iterator should return strings, not bytes (did you open the file in text)
- PHP read ini configuration error syntax error, unexpected ‘=’In
- Django reads the txt file in view
- After modifying the Tomcat configuration file in development, the modified configuration file will be automatically restored after ecplise starts Tomcat
- Configuration error in mybatis configuration file
- VNC logon when Connection union (10061) resolves
- Dontshlink resolves Proguard error: java.lang.stackoverflowerror
- Git command line configuration and configuration file to solve clone error libressl_ connect: SSL_ ERROR_ SYSCALL in connection to github. com:443
- IMG tag onerror event resolves infinite loop error reporting
- R reads JSON data
- Python how does a. Py file call classes and functions in another. Py file
- Python idle add configuration shortcut (Ctrl + L)
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- @Value gets the configuration file value and returns null
- OpenGL configuration file, as well as unable to parse the file solution
- Python read / write file error valueerror: I/O operation on closed file
- Specify the configuration file when the spring boot command starts
- Can’t find Python executable “D:\python3\python.exe”, you can set the PYTHON env variable.
- Eclipse specifies JDK version to start, and resolves version XXXX of the JVM is not suitable