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

Unable to parse SSAFile from string with empty layer #87

Closed
anderson-oki opened this issue Apr 27, 2024 · 1 comment
Closed

Unable to parse SSAFile from string with empty layer #87

anderson-oki opened this issue Apr 27, 2024 · 1 comment
Assignees
Labels

Comments

@anderson-oki
Copy link

anderson-oki commented Apr 27, 2024

Description

When trying to parse an SSAFile from string using pysubs2.SSAFile.from_string(text) where the content of the Events of Layer is an empty string that represents a single layer, mostly likely 0, we can't parse to int.

substation.py line 203.

elif f in {"borderstyle", "encoding", "marginl", "marginr", "marginv", "layer", "alphalevel"}:
    return int(v)
[Events]
Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text
Dialogue: ,0:00:22.98,0:00:24.85,Default,,0,0,0,,DELICIOUS IN DUNGEON
Dialogue: ,0:01:41.30,0:01:42.76,Default,,0,0,0,,Really, though.
Dialogue: ,0:01:43.35,0:01:46.56,Default,,0,0,0,,There's nothing more horrifying\Nthan black magic.
Dialogue: ,0:01:47.23,0:01:50.11,Default,,0,0,0,,Was bringing this person back\Nworth going down that path?
@tkarabela
Copy link
Owner

Fixed in version 1.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants