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

Add filename/fieldname to syntax errors for "keyframe" fields #797

Merged
merged 2 commits into from
Aug 12, 2023

Conversation

clemos
Copy link
Contributor

@clemos clemos commented Jun 27, 2023

Hi there 👋

This is a small PR to add minimal position info when a syntax error is raised while parsing key frame params.

Example new output:
Error: ''(' was never closed (translation_x@frame#26, line 1)'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli.

instead of just:
Error: ''(' was never closed (, line 1)'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli.

It also comes with minor refactoring to lower repetition in animation_key_frames.py

Any comment welcome :)

Also, I was willing to do further cleanup in this part of the code, but IMHO it lacks some unit tests to avoid breaking changes.
Do you have unit tests in place ? If not, do you plan on adding some, and if so how ?
In any case, do you have test cases to share regarding keyframe parsing ?

Thanks for your work :)

@hithereai
Copy link
Contributor

Thanks for the pr! I will look into it soon.

You're welcome to DM me in discord for further discussions on the raised points:
https://discordapp.com/users/hithere

@kabachuha kabachuha self-requested a review August 12, 2023 11:40
Copy link
Member

@kabachuha kabachuha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handles not all syntax breakup cases (like 0: (0.34), but a good beginning nevertheless

@kabachuha kabachuha merged commit eb16c85 into deforum-art:automatic1111-webui Aug 12, 2023
1 check passed
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.

3 participants