getpelican / pelican-themes

Themes for Pelican
https://getpelican.com/
2.13k stars 1.09k forks source link

Critical NoneType error with pelican 4.5.0 when installing Flex theme #687

Open nidupb opened 4 years ago

nidupb commented 4 years ago

Hi, I’m using pelican 4.5.0 with Python 3.8.5 and Invoke 1.4.1

When I do the command invoke build in my blog folder, I have the following output : `CRITICAL: argument of type 'NoneType' is not iterable``.

I tried to install a theme named Flex, so I added the following line in my pelicanconf.py file : THEME = "/Users/nicolas/pCloud Sync/Blog/pelican-themes/Flex"

If I remove the line, the command invoke build runs correctly.

Netlify output is :

8:27:17 PM: $ invoke build
8:27:17 PM: CRITICAL: Could not find the theme /Users/nicolas/pCloud Sync/Blog/pelican-themes/Flex
8:27:17 PM: ​
8:27:17 PM: ┌─────────────────────────────┐
8:27:17 PM: │   "build.command" failed    │
8:27:17 PM: └─────────────────────────────┘
8:27:17 PM: ​
8:27:17 PM:   Error message
8:27:17 PM:   Command failed with exit code 1: invoke build
8:27:17 PM: ​
8:27:17 PM:   Error location
8:27:17 PM:   In Build command from Netlify app:
8:27:17 PM:   invoke build
8:27:17 PM: ​
8:27:17 PM:   Resolved config
8:27:17 PM:   build:
8:27:17 PM:     command: invoke build
8:27:17 PM:     commandOrigin: ui
8:27:17 PM:     publish: /opt/build/repo/output

Also, the Pelican 4.5.0 documentation differs from the getpelican/pelican-themes git page (or I misunderstand something :) ). So I also tried using the pelican-themes command. It runs without any issue, and the pelican-themes -l shows my theme in the output. I guess I still have to put the THEME path in the pelicanconf.py file ? However, the invoke output is still the same.

Does anyone have an idea about the source of the error ? Thanks

avaris commented 4 years ago

Related: getpelican/pelican#2797

Workaround in the mean time, define PLUGINS in pelicanconf.