selplacei / konfsave

Easy saving and switching between multiple KDE configurations.
Apache License 2.0
45 stars 1 forks source link

"No profile is currently active." #6

Closed OctaveLarose closed 3 years ago

OctaveLarose commented 3 years ago

I can't save my current KDE configuration (using the default config.ini) with konfsave s. I get the following error:

Traceback (most recent call last):
  File "/usr/bin/konfsave", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.9/site-packages/konfsave/__main__.py", line 15, in main
    actions.parse_arguments(sys.argv)
  File "/usr/lib/python3.9/site-packages/konfsave/actions.py", line 51, in parse_arguments
    next(v for k, v in {
  File "/usr/lib/python3.9/site-packages/konfsave/actions.py", line 227, in action_save
    profiles.save(
  File "/usr/lib/python3.9/site-packages/konfsave/profiles.py", line 124, in save
    raise RuntimeError('Attempted to save the current profile, but no profile is active.')
RuntimeError: Attempted to save the current profile, but no profile is active.

Self-explanatory error, but what I'm confused about is why no profile is active in the first place. konfsave i yields a

No profile is currently active.
No profiles are saved.

...while I'd expect my KDE config to be detected. I'm assuming this might be because konfsave f shows me it saves a .kde4 directory in my $HOME directory, although I have a .kde dir instead. Is this tool only compatible with KDE 4? I couldn't find information related to this.

I have a feeling I may also simply be using the tool badly, though. Nevertheless, this means I can't figure out how to export my configs and so can't use it.

Thanks for your work so far, this project looks quite promising.

System information: Arch Linux, KDE Plasma Version: 5.21.2, KDE Frameworks Version: 5.79.0.

selplacei commented 3 years ago

Not sure what the issue is? There's no active profile because your configuration isn't saved. In fact, you have no profiles at all, so what would be the "current profile" other than nothing?

When you use "save" with no arguments, it'll try to guess which profile to save files to based on what the current profile is. If there isn't one, you get an error. Just specify a name for your profile after the konfsave save part.

selplacei commented 3 years ago

That being said, the error message definitely can be more user-friendly, so this will be addressed in a future version.

OctaveLarose commented 3 years ago

Thanks for the fast response. I thought that in the absence of a filename argument it would create a config with a default value ; I was thrown off by the fact that no mandatory arguments are shown when you run --help, and assumed this meant none were necessary (and that load would print the current configs and ask for user input, for instance).

However, if I had paid a little more attention, I would have realized there are help messages for detailed usage instructions by running save --help, for instance.

I personally don't find it too intuitive, but it's my fault nonetheless and I'll leave it up to you whether or not you want to change anything to the usage text and error messages.