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

[canterville] #160

Open
ianbarton opened this issue Jul 10, 2018 · 6 comments
Open

[canterville] #160

ianbarton opened this issue Jul 10, 2018 · 6 comments

Comments

@ianbarton
Copy link

I am getting the following error on Arch Linux.

Python 3.6.6
Nikola v7.8.15

`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 "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/doit/action.py", line 424, in execute
returned_value = self.py_callable(*self.args, **kwargs)
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/nikola/plugins/task/galleries.py", line 594, in render_gallery_index
self.site.render_template(template_name, output_name, context)
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/nikola/nikola.py", line 1488, in render_template
template_name, None, local_context)
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/nikola/plugins/template/mako.py", line 117, in render_template
data = template.render_unicode(**context)
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/mako/template.py", line 471, in render_unicode
as_unicode=True)
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/mako/runtime.py", line 838, in _render
**kwargs_for_callable(callable, data))
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/mako/runtime.py", line 873, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/mako/runtime.py", line 899, in exec_template
callable
(context, *args, **kwargs)
File "/home/ian/Documents/emacs/web_sites/hannah/art/cache/.mako.tmp/base.tmpl.py", line 81, in render_body
__M_writer(str(header.html_navigation_links()))
File "/home/ian/Documents/emacs/web_sites/hannah/art/cache/.mako.tmp/base_header.tmpl.py", line 123, in render_html_navigation_links
if rel_link(permalink, url) == "#":
File "/home/ian/.virtualenvs/nikola/lib/python3.6/site-packages/nikola/nikola.py", line 2002, in rel_link
dst = urljoin(src, dst)
File "/usr/lib64/python3.6/urllib/parse.py", line 488, in urljoin
base, url, _coerce_result = _coerce_args(base, url)
File "/usr/lib64/python3.6/urllib/parse.py", line 120, in _coerce_args
raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments

`

@Kwpolska
Copy link
Member

What are your NAVIGATION_LINKS?

@ianbarton
Copy link
Author

`NAVIGATION_LINKS = {
DEFAULT_LANG: (
("/archive.html", "Archive"),
("/categories/", "Tags"),
("/pages/about/index.html", "About"),

    ((("/pages/parish_council/index.html", "Parish Council"),
      ("/pages/transparency/index.html", "Transparency"),
      ('/pages/meetings/minutes-agendas/index.html', 'Parish Council Meetings and Agendas.')), 'Parish Council'),

    ("/pages/contributing/index.html", "Contributing"),
    ("/pages/contact/index.html", "Contact"),

    #((("/pages/contact/index.html", "Contact"),
    #  ('/pages/meetings/index.html', 'Meetings')), 'Meetings'),

    ("/rss.xml", "RSS feed"),



),

}
`

@Kwpolska
Copy link
Member

The Canterville theme currently supports one level of navigation links. Patches to make it work with submenus are always welcome.

@ianbarton
Copy link
Author

Thanks. However, I still get the error with the default config:
`NAVIGATION_LINKS = {
DEFAULT_LANG: (
('/archive.html', 'Archives'),
('/categories/index.html', 'Tags'),
('/rss.xml', 'RSS'),
((('/foo', 'FOO'),
('/bar', 'BAR')), 'BAZ'),
),

}
`

@Kwpolska
Copy link
Member

You still have some nesting in your example.

@ianbarton
Copy link
Author

Thanks, you are quite correct:) Works fine with no nesting.

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

2 participants