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

Traceback when translating the LICENSE setting in conf.py #1571

Closed
e2jk opened this issue Jan 7, 2015 · 2 comments
Closed

Traceback when translating the LICENSE setting in conf.py #1571

e2jk opened this issue Jan 7, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@e2jk
Copy link
Contributor

e2jk commented Jan 7, 2015

When setting the LICENSE configuration parameter to a simple string (e.g. LICENSE = "Works fine"), all works fine. But when setting that parameter to a dict in order to translate it (as this parameter is indicated as being translatable), such as e.g. LICENSE = {"en": "My Blog", "es": "Mi Blog"}) the following traceback is thrown:

$ nikola build
Traceback (most recent call last):
  File "/usr/local/bin/nikola", line 9, in <module>
    load_entry_point('Nikola==7.2.0', 'console_scripts', 'nikola')()
  File "/usr/local/lib/python2.7/dist-packages/nikola/__main__.py", line 118, in main
    site = Nikola(**config)
  File "/usr/local/lib/python2.7/dist-packages/nikola/nikola.py", line 434, in __init__
    self.config['CONTENT_FOOTER'].langformat(self.config['CONTENT_FOOTER_FORMATS'])
  File "/usr/local/lib/python2.7/dist-packages/nikola/utils.py", line 393, in langformat
    v = TranslatableSetting('NULL', v)
TypeError: __init__() takes exactly 4 arguments (3 given)

The form of the CONTENT_FOOTER parameter doesn't play a role in this issue, as the 2 forms (string or dict) work fine when the LICENSE parameter is a string, and the traceback is thrown in both cases when LICENSE is a dict, regardless if CONTENT_FOOTER was a string or dict.

Running Nikola v7.2.0 on Ubuntu 14.04, installed via pip.

@Kwpolska Kwpolska added the bug label Jan 7, 2015
@Kwpolska Kwpolska added this to the v7.3.0 milestone Jan 7, 2015
@Kwpolska Kwpolska self-assigned this Jan 7, 2015
@Kwpolska
Copy link
Member

Kwpolska commented Jan 7, 2015

There, fixed in 67c5fb2. Apparently, the signature of TranslatatableSetting was changed in f217ba7, but it was not reflected in langfrormat.

@e2jk
Copy link
Contributor Author

e2jk commented Jan 7, 2015

Thanks for this fast fix!

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

No branches or pull requests

2 participants