When I delete this at the top, the file runs (there are other bugs that are found in TexParser) but it won't even run TexParser with the dependencies/libraries above.
I have narrowed the potential palce of error:
expand_doc_new_labels When using TexSoup here it errors, here is the part of the error log
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
file_links = start_polly(file_holder, bib_holder)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 323, in start_polly
expand_doc_new_labels(master[0])
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 101, in expand_doc_new_labels
contents = replace_references(doc.read(), myHash)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_labels.py", line 72, in replace_references
myDoc = TexSoup.TexSoup(str(contents))
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
return TexEnv('[tex]', begin='', end='', contents=buf), tex
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
super().__init__(name, contents, args, preserve_whitespace, position)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
self._contents = list(contents) or []
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
yield read_expr(buf,
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 114, in read_expr
return read_arg(src, c, tolerance=tolerance)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 466, in read_arg
raise TypeError(
When I comment out the line of expanding labels, then the error occurs with expand_macros which ALSO uses TexSoup. Here is part of the error log with expand_labels commented out and it running and erroring at expand_macros.
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/application.py", line 215, in handle_form
file_links = start_polly(file_holder, bib_holder)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 327, in start_polly
parsed_contents = start_conversion(tex_file.read())
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/aws_polly_render.py", line 300, in start_conversion
parsed_contents = parser.parse(contents)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/conversion_parser.py", line 360, in parse
doc = expand_doc_macros(doc)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 158, in expand_doc_macros
doc = normalize_doc_macros(doc)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/expand_macros.py", line 149, in normalize_doc_macros
return TexSoup.TexSoup(text)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/__init__.py", line 87, in TexSoup
parsed, src = read(tex_code, skip_envs=skip_envs, tolerance=tolerance)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/tex.py", line 22, in read
return TexEnv('[tex]', begin='', end='', contents=buf), tex
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 892, in __init__
super().__init__(name, contents, args, preserve_whitespace, position)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/data.py", line 641, in __init__
self._contents = list(contents) or []
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 49, in read_tex
yield read_expr(buf,
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 95, in read_expr
name, args = read_command(src, tolerance=tolerance, mode=mode)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 540, in read_command
args = read_args(buf, n_required_args, n_optional_args,
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 347, in read_args
n_required = read_arg_required(src, args, n_required, tolerance, mode)
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 417, in read_arg_required
args.append(read_arg(
File "/Users/taichen/Desktop/Tai/MyRepos/Tex2Speech/latex2speech/tex2speech/virt/lib/python3.8/site-packages/TexSoup/reader.py", line 466, in read_arg
raise TypeError(
For
aztec.tex
file [found inDocumentation/hundred_k_errors/
, at the top of the file has all these dependencies before it starts\begin{document}
When I delete this at the top, the file runs (there are other bugs that are found in TexParser) but it won't even run TexParser with the dependencies/libraries above.
I have narrowed the potential palce of error:
expand_doc_new_labels
When using TexSoup here it errors, here is the part of the error logWhen I comment out the line of expanding labels, then the error occurs with
expand_macros
which ALSO uses TexSoup. Here is part of the error log with expand_labels commented out and it running and erroring at expand_macros.