When trying to run the script from any other directory, other than where the configuration file is, the script fails, because it can not find the config. This makes running from cron rather difficult.
To Reproduce
Install the script and configure.
Attempt to run script using absolute path away from the install directory. python3 /path/to/script.py
Traceback (most recent call last):
File "/home/fjen/RadarrSync/RadarrSync.py", line 50, in <module>
radarr_url = ConfigSectionMap("Radarr")['url']
File "/home/fjen/RadarrSync/RadarrSync.py", line 28, in ConfigSectionMap
options = Config.options(section)
File "/usr/local/lib/python2.7/dist-packages/backports/configparser/__init__.py", line 671, in options
raise from_none(NoSectionError(section))
backports.configparser.NoSectionError: No section: 'Radarr'
Describe the bug
When trying to run the script from any other directory, other than where the configuration file is, the script fails, because it can not find the config. This makes running from cron rather difficult.
To Reproduce
Install the script and configure.
Attempt to run script using absolute path away from the install directory.
python3 /path/to/script.py
Expected behavior
Script runs.
Configuration
Logs