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

TypeError for demo build (GistExtension/PodcastExtension/Markdown) #3635

Closed
ratkingsminion opened this issue Jul 16, 2022 · 7 comments
Closed
Labels

Comments

@ratkingsminion
Copy link

Environment

Python Version: installed via MS Store, Python 3.10

Nikola Version: Can't find out, as nikola version spawns the same error as below. I just downloaded the current one today.

Operating System: Windows 10

Description:

Hallo, I followed the Getting Started guide and without changing anything I called nikola build with a demo site. I get the following error:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\tools\nikola\Scripts\nikola.exe\__main__.py", line 7, in <module>
  File "C:\tools\nikola\lib\site-packages\nikola\__main__.py", line 166, in main
    _ = DN.run(oargs)
  File "C:\tools\nikola\lib\site-packages\nikola\__main__.py", line 354, in run
    self.nikola.init_plugins()
  File "C:\tools\nikola\lib\site-packages\nikola\nikola.py", line 1173, in init_plugins
    plugin_info.plugin_object.set_site(self)
  File "C:\tools\nikola\lib\site-packages\nikola\plugins\compile\markdown\__init__.py", line 105, in set_site
    self.converters[lang] = ThreadLocalMarkdown(extensions, lang_extension_configs)
  File "C:\tools\nikola\lib\site-packages\nikola\plugins\compile\markdown\__init__.py", line 59, in __init__
    self.markdown = Markdown(extensions=extensions, extension_configs=extension_configs, output_format="html5")
  File "C:\tools\nikola\lib\site-packages\markdown\core.py", line 96, in __init__
    self.registerExtensions(extensions=kwargs.get('extensions', []),
  File "C:\tools\nikola\lib\site-packages\markdown\core.py", line 131, in registerExtensions
    raise TypeError(
TypeError: Extension "yapsy_loaded_plugin_mdx_gist_0.GistExtension" must be of type: "markdown.extensions.Extension"
@JesperDramsch
Copy link
Contributor

JesperDramsch commented Jul 16, 2022

This is also happening on my build on my website with a Podcastextension. No idea how to debug this.

@danshapero
Copy link

danshapero commented Jul 16, 2022

@ratkingsminion You can do pip show nikola to query pip for what nikola version you're using.

I got a similar error message on nikola-8.2.2 but with PodcastExtension instead of Gist, even when I did a command like nikola --help. I tried downgrading several packages to see if I could make the error go away; downgrading the the markdown package from 3.4.1 to 3.3 made everything work. It's not clear to me if this is a problem in nikola or yapsy and I haven't dug any deeper to see what a more permanent fix might be.

Temporary workaround: pip install markdown==3.3.

@Kwpolska Kwpolska pinned this issue Jul 16, 2022
@Kwpolska Kwpolska changed the title TypeError for demo build TypeError for demo build (GistExtension/PodcastExtension/Markdown) Jul 16, 2022
@Kwpolska
Copy link
Member

master is now compatible with more recent versions of python-markdown (the code quality of those plugins isn’t the greatest though).

@JesperDramsch
Copy link
Contributor

@Kwpolska thanks for the quick fix. Could you make this a release for the Nikola action users?

@JesperDramsch
Copy link
Contributor

@Kwpolska following up on this as it is still breaking the automatic nikola action which is needed to run a scheduled blog on Nikola.

N-Wouda added a commit to N-Wouda/N-Wouda.github.io that referenced this issue Jul 28, 2022
At least until getnikola/nikola#3635 has been fixed, and is available on PyPI
@Kwpolska Kwpolska unpinned this issue Dec 14, 2022
@maphew
Copy link

maphew commented Jan 27, 2023

I got this same error with Nikola installed via conda on Windows 11. The version there (today) is 8.2.2. I attempted to upgrade to 8.2.3 in place using pip upgrade nikola[extras], and although new packages are downloaded and installed the error above still occurred and pip show nikola still reported 8.2.2.

A round of conda uninstall -y nikola && pip install nikola[extras] fixed it.

@Kwpolska
Copy link
Member

@maphew The Conda package is not an official Nikola package and we do not support it. We recommend using pip for Nikola (you don’t need any fancy scientiic packages for it, even if you’re using Jupyter notebooks). Please raise this issue with whoever provides the Conda package.

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

5 participants