Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling edit-settings fails if no config file exists #48

Closed
CarstenGrohmann opened this issue May 19, 2023 · 3 comments
Closed

Calling edit-settings fails if no config file exists #48

CarstenGrohmann opened this issue May 19, 2023 · 3 comments

Comments

@CarstenGrohmann
Copy link

CarstenGrohmann commented May 19, 2023

Editing the configuration settings fails if the configuration file does not exist yet.

# ./cli.py --help

+ /home/carsten/inverter-connect/.venv-app/bin/inverter_app --help

Use user settings file: /home/carsten/.config/inverter-connect/inverter-connect.toml...



╭─────────────────────────────────────────── Error ────────────────────────────────────────────╮
│                                                                                              │
│                                                                                              │
│     [yellow]No settings created yet[/yellow]: [green](Hint: call "edit-settings" first!)     │
│                                                                                              │
│                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯

# ./cli.py edit-settings

+ /home/carsten/inverter-connect/.venv-app/bin/inverter_app edit-settings

Use user settings file: /home/carsten/.config/inverter-connect/inverter-connect.toml...



╭─────────────────────────────────────────── Error ────────────────────────────────────────────╮
│                                                                                              │
│                                                                                              │
│     [yellow]No settings created yet[/yellow]: [green](Hint: call "edit-settings" first!)     │
│                                                                                              │
│                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────╯

# ll ~/.config/inverter-connect/
insgesamt 0

Affected version:

  • current main branch

Workaround:

  • create empty configuration file

    # touch ~/.config/inverter-connect/inverter-connect.toml
    
  • execute ./cli.py edit-settings again

What do you think about this behavior?

Regards,
Carsten

@mgraupner
Copy link

I'm having the exactly same problem. Your solution solved it.

If it helps: Running MacOS and Python 3.9.

@jedie
Copy link
Owner

jedie commented May 20, 2023

Hm. Okay i will try to reproduce it. Thanks for reporting.

jedie added a commit that referenced this issue May 20, 2023
Bugfix #48 Calling edit-settings fails if no config file exists
@jedie
Copy link
Owner

jedie commented May 20, 2023

fixed by #52

@jedie jedie closed this as completed May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants