解决方案:config.read()
读取绝对路径
import configparser
import os, sys
parent_dir = os.path.dirname(os.path.abspath(__file__))
config = configparser.ConfigParser()
config.read(parent_dir + "/main.conf") #读取配置文件采用绝对路径
configparser.NoSectionError: No section: '****'解决办法
原文:https://www.cnblogs.com/ojbk6943/p/14004481.html