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

Running nikola new_post --available-formats in a new site throws a TypeError #3750

Closed
alexwlchan opened this issue Jan 25, 2024 · 1 comment
Assignees
Labels

Comments

@alexwlchan
Copy link

Environment

Python Version: Python 3.12.0

Nikola Version: Nikola v8.3.0

Operating System: macOS 13.6.3

Description:

If I create a brand new Nikola site and run nikola new_post --available-formats, I get a TypeError rather than a list of formats.

Steps to reproduce:

$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install Nikola[extras]
[…output snippet]
$ nikola init --quiet mydemo
$ cd mydemo/
$ nikola new_post --available-formats
Traceback (most recent call last):
  File "/private/var/folders/_c/h0g4c9_n6rg8d2v509hztzdc0000gn/T/tmp.TFs3tLwQ/.venv/lib/python3.12/site-packages/doit/doit_cmd.py", line 294, in run
    return command.parse_execute(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/_c/h0g4c9_n6rg8d2v509hztzdc0000gn/T/tmp.TFs3tLwQ/.venv/lib/python3.12/site-packages/doit/cmd_base.py", line 150, in parse_execute
    return self.execute(params, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/_c/h0g4c9_n6rg8d2v509hztzdc0000gn/T/tmp.TFs3tLwQ/.venv/lib/python3.12/site-packages/nikola/plugin_categories.py", line 131, in execute
    return self._execute(options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/private/var/folders/_c/h0g4c9_n6rg8d2v509hztzdc0000gn/T/tmp.TFs3tLwQ/.venv/lib/python3.12/site-packages/nikola/plugins/command/new_post.py", line 247, in _execute
    self.print_compilers()
  File "/private/var/folders/_c/h0g4c9_n6rg8d2v509hztzdc0000gn/T/tmp.TFs3tLwQ/.venv/lib/python3.12/site-packages/nikola/plugins/command/new_post.py", line 523, in print_compilers
    for name, (_, _, pi) in self.site.disabled_compilers.items():
              ^^^^^^^^^^
TypeError: cannot unpack non-iterable PluginCandidate object
@alexwlchan
Copy link
Author

@Kwpolska thanks for fixing this so quickly! 💚

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