edmundmok / mealpy

Order your meals on MealPal automatically!
MIT License
28 stars 22 forks source link

Config not found #22

Closed ipwnponies closed 5 years ago

ipwnponies commented 5 years ago

FileNotFoundError when running script:

python mealpy/mealpy.py reserve foo bar sf
Traceback (most recent call last):
  File "mealpy/mealpy.py", line 229, in <module>
    cli()
...
Snipped for brevity
...
  File "mealpy/mealpy.py", line 138, in get_mealpal_credentials
    config = load_config()
  File "mealpy/mealpy.py", line 49, in load_config
    copyfile(template_config_path, config_path)
  File "/Users/ipwponies/repos/mealpy/venv/lib/python3.7/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/ipwnponies/repos/mealpy/mealpy/config.template.yaml'

This was introduced in PR #20, whenmealpal.py was moved to a package.

ipwnponies commented 5 years ago

While we're fixing this, I propose we become XDG compliant and put values into $XDG_CONFIG. We can use the helper xdg package.