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

Project with many files will raise RecursionError #104

Open
EmadMokhtar opened this issue Aug 8, 2018 · 0 comments
Open

Project with many files will raise RecursionError #104

EmadMokhtar opened this issue Aug 8, 2018 · 0 comments

Comments

@EmadMokhtar
Copy link

I have a project with many *.py files, when I run pycco command to generate docs for all py files, it will raise RecursionError: maximum recursion depth exceeded while calling a Python object

Command

 pycco app/**/*py --directory=tech-docs -p -i -s

Python version: 3.6.2
Pycco version: 0.6.0

Call Stack

Traceback (most recent call last):
  File "/Users/emadmokhtar/.virtualenvs/project/bin/pycco", line 11, in <module>
    sys.exit(main())
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 631, in main
    skip=args.skip_bad_files)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 533, in process
    next_file()
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 532, in next_file
    next_file()
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 532, in next_file
    next_file()
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 532, in next_file
    next_file()
  [Previous line repeated 960 more times]
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 521, in next_file
    encoding=encoding))
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 80, in generate_documentation
    return _generate_documentation(source, code, outdir, preserve_paths, language)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 90, in _generate_documentation
    return generate_html(file_path, sections, preserve_paths=preserve_paths, outdir=outdir)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco/main.py", line 340, in generate_html
    "source": source,
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pycco_resources/__init__.py", line 243, in <lambda>
    return lambda context: pystache.render(source, context)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/init.py", line 19, in render
    return renderer.render(template, context, **kwargs)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderer.py", line 454, in render
    return self._render_string(template, *context, **kwargs)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderer.py", line 402, in _render_string
    return self._render_final(render_func, *context, **kwargs)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderer.py", line 419, in _render_final
    return render_func(engine, stack)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderer.py", line 400, in <lambda>
    render_func = lambda engine, stack: engine.render(template, stack)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderengine.py", line 181, in render
    return parsed_template.render(self, context_stack)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/parsed.py", line 47, in render
    parts = list(map(get_unicode, self._parse_tree))
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/parsed.py", line 46, in get_unicode
    return node.render(engine, context)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/parser.py", line 218, in render
    parts.append(self.parsed.render(engine, context))
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/parsed.py", line 47, in render
    parts = list(map(get_unicode, self._parse_tree))
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/parsed.py", line 46, in get_unicode
    return node.render(engine, context)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/parser.py", line 121, in render
    s = engine.fetch_string(context, self.key)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderengine.py", line 105, in fetch_string
    val = self.resolve_context(context, name)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderer.py", line 317, in resolve_context
    return context_get(stack, name)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/renderengine.py", line 19, in context_get
    return stack.get(name)
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/context.py", line 281, in get
    result = self._get_simple(parts[0])
  File "/Users/emadmokhtar/.virtualenvs/project/lib/python3.6/site-packages/pystache/context.py", line 309, in _get_simple
    for item in reversed(self._stack):
RecursionError: maximum recursion depth exceeded while calling a Python object
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