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

Failed apply after import #109

Closed
1ter opened this issue May 8, 2024 · 1 comment
Closed

Failed apply after import #109

1ter opened this issue May 8, 2024 · 1 comment

Comments

@1ter
Copy link

1ter commented May 8, 2024

Describe the bug
Exporting a profile in a Host PC and then applying .knsv after importing it in a Virtual Machine does fail.

Konsave: Profile not found :(
Please check the log at /home/prova/.cache/konsave_log.txt for more details

This is konsave_log.txt (tried couple of times):

[08/05/2024 10:42:18]
Traceback (most recent call last):
  File "/home/prova/env/lib64/python3.6/site-packages/konsave/funcs.py", line 40, in inner_func
    function = func(*args, **kwargs)
  File "/home/prova/env/lib64/python3.6/site-packages/konsave/funcs.py", line 216, in apply_profile
    assert profile_name in profile_list, "Profile not found :("
AssertionError: Profile not found :(

[08/05/2024 10:42:56]
Traceback (most recent call last):
  File "/home/prova/env/lib64/python3.6/site-packages/konsave/funcs.py", line 40, in inner_func
    function = func(*args, **kwargs)
  File "/home/prova/env/lib64/python3.6/site-packages/konsave/funcs.py", line 216, in apply_profile
    assert profile_name in profile_list, "Profile not found :("
AssertionError: Profile not found :(

[08/05/2024 10:48:04]
Traceback (most recent call last):
  File "/home/prova/env/lib64/python3.6/site-packages/konsave/funcs.py", line 40, in inner_func
    function = func(*args, **kwargs)
  File "/home/prova/env/lib64/python3.6/site-packages/konsave/funcs.py", line 347, in import_profile
    ), "A profile with this name already exists"
AssertionError: A profile with this name already exists

To reproduce

Host (PC)

python3 -m venv env
source env/bin/activate
(env) pip install konsave
(env) konsave -s nickname
(env) konsave -e nickname

Target (VM)

python3 -m venv env
source env/bin/activate
(env) pip install konsave
(env) konsave -i nickname.knsv
(env) konsave -a 1

Expected behavior
Expected applying .knsv file succesfully.

Screenshots

Host (PC):
image

Target (VM):
image

System information

  • OS or Linux distribution: Kubuntu 23.10 (KDE Plasma 5.27.10)
  • How did you install Konsave? Using pip on both machines inside virtualenv
  • What version of Konsave are you using? 2.2.0 (on both source and target) Did you try updating? Why? I just installed right now on both, they are using last version available.

Additional context
What I was trying to do was exporting/importing between a Host and it's VM (virtualbox).
Target host is a VM with slightly different KDE plasma version and different distro (Opensuse Leap 15.5).

Source host: PC with Plasma ver. 5.27.10
Target host: VM with Plasma ver. 5.27.9

Both cases using virtual environment for python.

@1ter 1ter changed the title Failing apply after import Failed apply after import May 9, 2024
@Prayag2
Copy link
Owner

Prayag2 commented May 18, 2024

That's happening because IDs are no longer used to reference profiles. You refer to them using their names. So, in your case, you'll have to run these commands instead on your target machine-

python3 -m venv env
source env/bin/activate
(env) pip install konsave
(env) konsave -i nickname.knsv
(env) konsave -a nickname

Notice that I'm using nickname instead of 1 in the last command.
In the next release, you'll be able to use both, IDs and names to refer to profiles. (See #77)

@Prayag2 Prayag2 closed this as completed May 18, 2024
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

2 participants