Added ELSE in line 56 to prevent error which occurs when the passed path is not None. If path is not None, cfg tries to load directory, because it is missing the file name at the end.
To test try running the following code (changing constants as needed): MY_PATH = r'/home/pi/mycar/'
MY_FILE = r'myconfig.py'
Added ELSE in line 56 to prevent error which occurs when the passed path is not None. If path is not None, cfg tries to load directory, because it is missing the file name at the end.
To test try running the following code (changing constants as needed): MY_PATH = r'/home/pi/mycar/' MY_FILE = r'myconfig.py'
cfg = dk.load_config(config_path=MY_PATH, myconfig=MY_FILE)