A simple code to read a config file with ConfigParser works fine when it's run on command-line, but the same .py code cannot read the same config file when using VS code.
I've changed the default venv for VScode to make sure to use the same environment with the command-line, but it doesn't work.
import configparser
cfg = configparser.ConfigParser()
cfg.read('setting.conf')
print(cfg.has_section('section1'))
Whereas running the code above returns True, running this on VScode returns following error:
configparser.NoSectionError: No section: 'section1'