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

pydantic >2.9 causes failures with launch file #352

Open
anfederman opened this issue Nov 16, 2024 · 2 comments
Open

pydantic >2.9 causes failures with launch file #352

anfederman opened this issue Nov 16, 2024 · 2 comments
Assignees

Comments

@anfederman
Copy link

ros2 launch usb_cam camera.launch.py
[INFO] [launch]: All log files can be found below /home/ubiqlap/.ros/log/2024-11-16-08-31-53-762719-ubiqlap-X540LA-5691
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught multiple exceptions when trying to load file of format [py]:

  • 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.9/u/root-validator-pre-skip

  • InvalidFrontendLaunchFileError: The launch file may have a syntax error, or its format is unknown
@flynneva
Copy link
Collaborator

@anfederman thanks for reporting the error! Looks like we need to update the launch file to the latest pydantic syntax.

I won't have time to tackle this anytime soon unfortunately, but would happily review a PR

@flynneva flynneva self-assigned this Feb 8, 2025
@flynneva
Copy link
Collaborator

flynneva commented Feb 8, 2025

@anfederman so I believe this is only an issue if you use pydantic>=2.9 it looks like.

For Humble - using rosdep to install pydantic would be like calling sudo apt-get install python3-pydantic....which isnt > 2.9.

Even for Rolling on Ubuntu 24.04 (what I have locally) it will still install an older version of pydantic: https://launchpad.net/ubuntu/+source/pydantic

So not sure I want to make this fix just yet, but will probably have to make it once Rolling switches to a new Ubuntu distro.

flynneva added a commit that referenced this issue Feb 8, 2025
Relates to #352

Signed-off-by: Evan Flynn <[email protected]>
@flynneva flynneva changed the title humble launch fails pydantic >2.9 causes failures with launch file Feb 9, 2025
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

Successfully merging a pull request may close this issue.

2 participants