You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(.venv) manitou@Olegs-MacBook-Pro ~/dev/utils/pyang pyang -f tree test.yang
Traceback (most recent call last):
File "/Users/manitou/dev/utils/pyang/.venv/bin/pyang", line 8, in <module>
sys.exit(run())
^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/scripts/pyang_tool.py", line 389, in run
module = ctx.add_module(filename, text, in_format, name, rev,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/context.py", line 81, in add_module
module = p.parse(self, ref, text)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 290, in parse
stmt = self._parse_statement(None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 353, in _parse_statement
while self.tokenizer.peek() != '}':
^^^^^^^^^^^^^^^^^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 148, in peek
self.skip(self.keep_comments)
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 74, in skip
return self.skip(keep_comments=keep_comments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 74, in skip
return self.skip(keep_comments=keep_comments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 74, in skip
return self.skip(keep_comments=keep_comments)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Previous line repeated 989 more times]
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 73, in skip
self.readline()
File "/Users/manitou/dev/utils/pyang/.venv/lib/python3.11/site-packages/pyang/yang_parser.py", line 37, in readline
self.buf = self.lines.popleft()
^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded while calling a Python object
YANG files can be very big and quite often part of it is commented out to verify smth or just reduce load.
Personally, I don't see any logic in recursive call during skipping commented lines.
The text was updated successfully, but these errors were encountered:
Steps to reproduce:
pyang -f tree test.yang
YANG files can be very big and quite often part of it is commented out to verify smth or just reduce load.
Personally, I don't see any logic in recursive call during skipping commented lines.
The text was updated successfully, but these errors were encountered: