autorope / donkeycar

Open source hardware and software platform to build a small scale self driving car.
http://www.donkeycar.com
MIT License
3.13k stars 1.29k forks source link

Update config.py #1132

Closed phantom-philosopher closed 1 year ago

phantom-philosopher commented 1 year ago

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)