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

"nikola build --pdb" doesn't #1947

Closed
smurfix opened this issue Aug 16, 2015 · 4 comments
Closed

"nikola build --pdb" doesn't #1947

smurfix opened this issue Aug 16, 2015 · 4 comments

Comments

@smurfix
Copy link

smurfix commented Aug 16, 2015

I tried to debug code in a theme. No such luck.

$ nikola build --pdb
Scanning posts......done!
.  render_galleries:output/galleries/index.html
########################################
TaskError - taskid:render_galleries:output/galleries/index.html
PythonAction Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/doit/action.py", line 372, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/d/src/git/nikola/nikola/nikola/plugins/task/galleries.py", line 556, in render_gallery_index
    self.site.render_template(template_name, output_name, context)
  File "/d/src/git/nikola/nikola/nikola/nikola.py", line 1037, in render_template
    template_name, None, local_context)
  File "/d/src/git/nikola/nikola/nikola/plugins/template/jinja.py", line 92, in render_template
    output = template.render(**context)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/d/src/git/nikola/nikola/nikola/data/themes/base-jinja/templates/gallery.tmpl", line 4, in top-level template code
    {% import 'crumbs.tmpl' as ui with context %}
  File "themes/zen-jinja/templates/base.tmpl", line 15, in top-level template code
    {{ arusahni.html_navigation_links() }}
  File "themes/zen-jinja/templates/arusahni_helper.tmpl", line 126, in template
    {% for surl, stext, sicon in url %}
ValueError: too many values to unpack

$ 

How do I get at that value?

@Kwpolska
Copy link
Member

pdb won't really help you here; the Zen themes need special navigation
links configuration, and that's documented along those themes.

Chris Warrick https://chriswarrick.com/
Sent from my Galaxy S3.
On 16 Aug 2015 21:43, "Matthias Urlichs" notifications@github.com wrote:

I tried to debug code in a theme. No such luck.

$ nikola build --pdb
Scanning posts......done!
. render_galleries:output/galleries/index.html
########################################
TaskError - taskid:render_galleries:output/galleries/index.html
PythonAction Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/doit/action.py", line 372, in execute
returned_value = self.py_callable(_self.args, *_kwargs)
File "/d/src/git/nikola/nikola/nikola/plugins/task/galleries.py", line 556, in render_gallery_index
self.site.render_template(template_name, output_name, context)
File "/d/src/git/nikola/nikola/nikola/nikola.py", line 1037, in render_template
template_name, None, local_context)
File "/d/src/git/nikola/nikola/nikola/plugins/template/jinja.py", line 92, in render_template
output = template.render(**context)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/d/src/git/nikola/nikola/nikola/data/themes/base-jinja/templates/gallery.tmpl", line 4, in top-level template code
{% import 'crumbs.tmpl' as ui with context %}
File "themes/zen-jinja/templates/base.tmpl", line 15, in top-level template code
{{ arusahni.html_navigation_links() }}
File "themes/zen-jinja/templates/arusahni_helper.tmpl", line 126, in template
{% for surl, stext, sicon in url %}
ValueError: too many values to unpack

$


Reply to this email directly or view it on GitHub
#1947.

@smurfix
Copy link
Author

smurfix commented Aug 16, 2015

@Kwpolska I know that. This issue is not about the Zen-Jinja theme, which I'm modifing anyway (it doesn't have submenu navigation, which I want to add). This issue is about the ability to debug problems.

@Kwpolska
Copy link
Member

I can reproduce, and this is a doit bug (also happens outside of Nikola). @schettino72, any ideas?

@Kwpolska Kwpolska added the bug label Aug 17, 2015
@schettino72
Copy link
Member

I guess the docs are clear enough: http://pydoit.org/cmd_run.html#pdb
It is documented, so it is not a bug 😁

I agree that it would be an useful addition to debug exception in task execution too.
For that please create an issue (or better a PR) on doit tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants