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

Line.tagsBlocks would fail on lines with shape because Line.process won't convert line.text to Text. #3

Open
Akatmks opened this issue Jan 12, 2025 · 0 comments

Comments

@Akatmks
Copy link

Akatmks commented Jan 12, 2025

Line.tagsBlocks would fail...

for tags, text in l.text\iter!

Error occurred during execution:
[string "C:\fakepath\arch1t3cht Feature Release 12\automation\include\ILL\ILL\Ass\Line.moon"]:192: attempt to call method 'iter' (a nil value)
Stack Traceback:
(1) Lua field 'tagsBlocks' at line 192 of chunk '"C:\fakepath\arch1t3cht Feature Release 12\automation\include\ILL\ILL\Ass\Line.moon"]'
	Local variables:
	 ass = table: 0x023026f95a60  {i:0, activeLine:2445, remLine:true, sel:table: 0x02300098bfc8, newSelection:table: 0x023026f95aa8, meta:table: 0x02300e451d78, styles:table: 0x02300e451e28, sub:userdata: 0x02300dc2fb80, fi:41}
	 l = table: 0x023027090c18  {height:0, left:960, shape:m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09, end_time:642550, start_time:642040, raw:Dialogue: 0,0:10:42.04,0:10:42.55,Sign 75S752,Text switch,0,0,0,,{\p1}m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09, text:{\p1}m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09, data:table: 0x02301a0326b8, center:960, extra:table: 0x0230270ace00, actor:Text switch, effect:, layer:0, duration:510, style:Sign 75S752, y:1055, isShape:true, top:1055, middle:1055, bottom:1055, x:960, right:960, eff_margin_b:25, text_stripped:, styleref:table: 0x0230270acbf8, section:[Events], ascent:56.453125, class:dialogue, descent:18.546875, internal_leading:13.375, external_leading:0, eff_margin_l:30, margin_l:0 (more...)}
	 noblank = boolean: true
	 data = table: 0x023027090c60  {width:0, n:0, height:0}
	 an = number: 2
	 left = number: 0
	 ascent = number: 0
	 descent = number: 0
	 (*temporary) = nil
	 (*temporary) = table: 0x02300e451d78  {ycbcr matrix:TV.709, scaledborderandshadow:yes, title:[SweetSub] Momentary Lily - 02, wrapstyle:0, playresy:1080, original translation:, original editing:, original timing:, synch point:, script updated by:, update details:, scripttype:v4.00+, res_x:1920, res_y:1080, video_x_correct_factor:1, playresx:1920}
	 (*temporary) = string: "{\\p1}m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09"
	 (*temporary) = number: 1080
	 (*temporary) = number: 1
	 (*temporary) = table: 0x023027090c18  {height:0, left:960, shape:m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09, end_time:642550, start_time:642040, raw:Dialogue: 0,0:10:42.04,0:10:42.55,Sign 75S752,Text switch,0,0,0,,{\p1}m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09, text:{\p1}m 34.26 -51.27 l 34.26 -46.64 28.46 -46.09, data:table: 0x02301a0326b8, center:960, extra:table: 0x0230270ace00, actor:Text switch, effect:, layer:0, duration:510, style:Sign 75S752, y:1055, isShape:true, top:1055, middle:1055, bottom:1055, x:960, right:960, eff_margin_b:25, text_stripped:, styleref:table: 0x0230270acbf8, section:[Events], ascent:56.453125, class:dialogue, descent:18.546875, internal_leading:13.375, external_leading:0, eff_margin_l:30, margin_l:0 (more...)}
	 (*temporary) = boolean: false
	 (*temporary) = table: 0x0230101820c0  {1:\p1, __tostring:function: 0x02301005fcf8}
	 (*temporary) = table: 0x023013b5d210  {dc:cdata<void *>: 0x77011d66, dx:0.015625, italic:false, family:HYQiHei-75S, bold:false, dy:0.015625, underline:false, xscale:1, strikeout:false, size:75, yscale:1, hspace:0.1}
	 (*temporary) = number: 2
	 (*temporary) = number: 2
	 (*temporary) = number: 2
	 (*temporary) = number: 1055
	 (*temporary) = string: "attempt to call method 'iter' (a nil value)"

... on lines with shape due to Line.process not converting line.text to Text.

if type(l.text) == "string" and not l.isShape
l.text = Text l.text

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

No branches or pull requests

1 participant