flap
flap copied to clipboard
Maximum recursion depth exceeded
I am using flap to flatten a fairly standard journal file. When I run the command flap source.tex out.tex
I get the following error:
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 153, in _evaluate_until
tokens += self._evaluate_one()
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 138, in _evaluate_one
return self.evaluate_command(str(self._next_token))
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 164, in evaluate_command
return macro.invoke(self)
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/macros.py", line 124, in invoke
return self._execute(parser, invocation)
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/macros.py", line 150, in _execute
return parser._spawn(self._body, invocation.arguments)._evaluate_group()
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 146, in _evaluate_group
tokens = self._evaluate_until(lambda token: token.ends_a_group)
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 153, in _evaluate_until
tokens += self._evaluate_one()
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 138, in _evaluate_one
return self.evaluate_command(str(self._next_token))
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 161, in evaluate_command
if command not in self._definitions:
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 43, in __contains__
return key in self._definitions or (self._parent and key in self._parent)
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 43, in __contains__
return key in self._definitions or (self._parent and key in self._parent)
File "/home/shaunak/anaconda/envs/Python3x/lib/python3.6/site-packages/flap/latex/parser.py", line 43, in __contains__
return key in self._definitions or (self._parent and key in self._parent)
[Previous line repeated 77 more times]
RecursionError: maximum recursion depth exceeded
My python version is:
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 13:51:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
I have attached the directory structure of the project to this issue. The main file is called 0_Trento_2016.tex. There are image files in the Figures folder.