Skip to content

Conversation

@deruyter92
Copy link
Contributor

@deruyter92 deruyter92 commented Nov 7, 2025

This PR fixes an issue with external package ruamel.yaml, causing corrupted yaml files when creating a project with long video paths containing spaces. (Fixes #3119)

The issue is patched by increasing the width parameter before dumping, preventing long sequences to be moved to a new line, as suggested by the author here.

Some unit tests are added for writing config files with various (unorthodox) video paths, to make sure that video configurations are loaded as intended.

…paths

ruamel.yaml was inserting unintended newlines when dumping paths, leading to corrupted YAML files for long video paths containing spaces.

Fixes DeepLabCut#3119
@AlexEMG AlexEMG self-requested a review November 7, 2025 15:31
deruyter92 and others added 4 commits November 7, 2025 20:31
When providing an empty video directory to `create_new_project`, the empty directory was mistakenly treated as video file for which a symbolic link is created. The current commit fixes this unintended behaviour.
@deruyter92
Copy link
Contributor Author

Also added a minor change to deeplabcut.create_project.new, to make sure that only video files and no directories are added to the final list of videos. (The create_project function unintendedly treated empty video directories as a video file, for which a symbolic link is created. This behavior is now fixed).

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 this pull request may close these issues.

incorrectly formatted yaml file for long file name

1 participant