On Mon, 13 Jul 2020 at 00:44, Erik Ritch <[email protected]> wrote:
>
> I recently upgraded from version 8.0.4 to 8.1.1 and was creating a new 
> environment on a new computer.  When attempting to install the plugins that I 
> use, I keep running into the following error from Nikola.
>
> Traceback (most recent call last):
>   File "c:\program files (x86)\python38-32\lib\runpy.py", line 194, in 
> _run_module_as_main
>     return _run_code(code, main_globals, None,
>   File "c:\program files (x86)\python38-32\lib\runpy.py", line 87, in 
> _run_code
>     exec(code, run_globals)
>   File "C:\Users\ejunk\nikola-env\Scripts\nikola.exe\__main__.py", line 7, in 
> <module>
>   File "c:\users\ejunk\nikola-env\lib\site-packages\nikola\__main__.py", line 
> 167, in main
>     _ = DN.run(oargs)
>   File "c:\users\ejunk\nikola-env\lib\site-packages\nikola\__main__.py", line 
> 341, in run
>     self.nikola.init_plugins(load_all=True)
>   File "c:\users\ejunk\nikola-env\lib\site-packages\nikola\nikola.py", line 
> 1073, in init_plugins
>     self.plugin_manager._candidates = 
> self._filter_duplicate_plugins(self.plugin_manager._candidates)
>   File "c:\users\ejunk\nikola-env\lib\site-packages\nikola\nikola.py", line 
> 996, in _filter_duplicate_plugins
>     plugins.sort(key=plugin_position_in_places)
> TypeError: '<' not supported between instances of 'int' and 'NoneType'
>
> The error does not seem to be limited to a single plugin.  Sometimes I can 
> install one or two plugins before I get the error and sometimes it happens 
> with the first plugin I install.  Once the error happens, the only way to get 
> Nikola to do anything is to delete all the plugins.  This is being done in a 
> fresh virtualenv and a fresh nikola site (nikola init mysite).  I am 
> attempting to install the plugins sass, sidebar, file_tree_subs, tags, 
> static_tag_cloud, and localsearch.
>
> OS is Windows 10 home, version 1909
> Python 3.8.3 x32
> Nikola 8.1.1
>
> Any help you can give would be greatly appreciated!
>
> Erik
>
> --
> You received this message because you are subscribed to the Google Groups 
> "nikola-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/nikola-discuss/24a7c8b3-e0bd-45d6-9f3b-05be077e2973o%40googlegroups.com.

Cannot reproduce with a similar configuration (64-bit Python on
Windows). file_tree_subs is not a Nikola plugin. Do you have any
global plugins (~/.nikola/plugins)? Could you modify the
_filter_duplicate_plugins functions on line 985 in nikola.py like this
and show the resulting errors?

        def plugin_position_in_places(plugin):
            # plugin here is a tuple:
            # (path to the .plugin file, path to plugin module w/o
.py, plugin metadata)
            for i, place in enumerate(self._plugin_places):
                if plugin[0].startswith(place):
                    utils.LOGGER.warn("{}: {}, {}".format(i, place, plugin))
                    return i
            utils.LOGGER.warn("None: {}, {}".format(place, plugin))


-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

-- 
You received this message because you are subscribed to the Google Groups 
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nikola-discuss/CAMw%2Bj7JXfxZjd%2BmJ_4Rkq9KcBJgWieOMEbya3ZaWogWma6eeNw%40mail.gmail.com.

Reply via email to