Open
Conversation
added 2 commits
July 1, 2021 20:48
This fix the error: AttributeError: 'NoneType' object has no attribute 'start' Explaining the error: It is caused because the caption has a blank value, a blank caption with no text, this causes the default code that joins the subtitles to go into error, as it cannot join a received None value, with an existing String value, and ends up breaking the subtitle conversion. Problem example (DFXP/SMPTE xml): ```<p region='pop1' style='basic' begin='01:55:05:08' end='01:55:11:14' tts:origin='17.5% 84.66%' tts:extent='62.5% 5.33%'>Subtitle End</p> <p region='pop2' style='basic' begin='01:55:05:08' end='01:55:11:14' tts:origin='50% 84.66%' tts:extent='0% 5.33%'></p>```
Fix merge of an empty caption
ana-nichifor
suggested changes
Jul 5, 2021
Contributor
ana-nichifor
left a comment
There was a problem hiding this comment.
Hi, thanks for your contribution! The modifications look good to me. Please add a unit test with the example you provided and it's good to go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix the error:
Explaining the error:
Problem example (DFXP/SMPTE xml):