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

Yafti command fails with deprecation error #208

Open
alexispurslane opened this issue Mar 12, 2024 · 3 comments
Open

Yafti command fails with deprecation error #208

alexispurslane opened this issue Mar 12, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@alexispurslane
Copy link

OS image: silverblue-nvidia-userns-hardened:latest
OS version: 39.20240311.0

Command:

$ yafti -f /usr/share/ublue-os/firstboot/yafti.yml

Error:

Traceback (most recent call last):
  File "/usr/bin/yafti", line 5, in <module>
    from yafti.__main__ import app
  File "/usr/lib/python3.12/site-packages/yafti/__main__.py", line 25, in <module>
    from yafti.app import Yafti
  File "/usr/lib/python3.12/site-packages/yafti/app.py", line 25, in <module>
    from yafti.screen.window import Window
  File "/usr/lib/python3.12/site-packages/yafti/screen/window.py", line 8, in <module>
    from yafti.registry import SCREENS
  File "/usr/lib/python3.12/site-packages/yafti/registry.py", line 7, in <module>
    PLUGINS = {s.name: s.load()() for s in _plugins}
                       ^^^^^^^^
  File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 205, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/yafti/plugin/flatpak.py", line 93, in <module>
    class Flatpak(Run):
  File "/usr/lib/python3.12/site-packages/yafti/plugin/flatpak.py", line 101, in Flatpak
    class Scheme(BaseModel):
  File "/usr/lib/python3.12/site-packages/yafti/plugin/flatpak.py", line 107, in Scheme
    @root_validator
     ^^^^^^^^^^^^^^
  File "/var/home/alexispurslane/.local/lib/python3.12/site-packages/pydantic/deprecated/class_validators.py", line 231, in root_validator
    return root_validator()(*__args)  # type: ignore
           ^^^^^^^^^^^^^^^^
  File "/var/home/alexispurslane/.local/lib/python3.12/site-packages/pydantic/deprecated/class_validators.py", line 237, in root_validator
    raise PydanticUserError(
pydantic.errors.PydanticUserError: If you use `@root_validator` with pre=False (the default) you MUST specify `skip_on_failure=True`. Note that `@root_validator` is deprecated and should be replaced with `@model_validator`.

For further information visit https://errors.pydantic.dev/2.6/u/root-validator-pre-skip

@marcoceppi
Copy link
Collaborator

Can you include the yafti.yaml you're using? We have not yet migrated to pydantic version v2 but I know there are those interested in doing so.

Also, can you run pip freeze on your environment? This error looks like it's coming from a mismatched version of pydantic dependency installed.

@alexispurslane
Copy link
Author

@marcoceppi

Can you include the yafti.yaml you're using? We have not yet migrated to pydantic version v2 but I know there are those interested in doing so.

Sure! It's just the file provided as stock with the image I was using: https://github.com/secureblue/secureblue/blob/live/config/files/usr/share/ublue-os/firstboot/yafti.yml

Also, can you run pip freeze on your environment? This error looks like it's coming from a mismatched version of pydantic dependency installed.

Agreed on the pydantic version probably being mismatched. I'll run a pip freeze when I get a chance in a bit.

@abanna abanna self-assigned this May 2, 2024
@abanna abanna added the beta label May 2, 2024
@abanna abanna added this to uPortal May 2, 2024
@abanna
Copy link
Collaborator

abanna commented May 2, 2024

@alexispurslane I'll working on removing or updating this in the near future.

@abanna abanna moved this to Backlog in uPortal May 2, 2024
@abanna abanna added this to the 0.0.9-beta1 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

3 participants