getpelican / pelican

Static site generator that supports Markdown and reST syntax. Powered by Python.
https://getpelican.com
GNU Affero General Public License v3.0
12.58k stars 1.81k forks source link

recipe for target 'publish' failed #2506

Closed jzrchilel closed 5 years ago

jzrchilel commented 5 years ago

Hi guys! I'm trying to publish a simple static page but i'm stuck with an error:

**CRITICAL: TypeError: not all arguments converted during string formatting Makefile:75: recipe for target 'publish' failed make: * [publish] Error 1

I got this error when i change the theme from notmyidea to basic. I installed the way documentation says: pelican-themes --install ~/MyRoute/pelican-themes/basic --verbose. When I execute make github or make publish with notmyidea theme, it work just fine.

This is my pelicanconf.py:

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

AUTHOR = 'Jezer'
SITENAME = 'Jezer'
SITEURL = ''

PATH = 'content'

TIMEZONE = 'America/Los_Angeles'

DEFAULT_LANG = 'en'

# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None

# Blogroll
LINKS = (('Pelican', 'http://getpelican.com/'),
         ('Python.org', 'http://python.org/'),
         ('Jinja2', 'http://jinja.pocoo.org/'),
         ('You can modify those links in your config file', '#'),)

# Social widget
SOCIAL = (('You can add links in your config file', '#'),
          ('Another social link', '#'),)

DEFAULT_PAGINATION = 10

THEME='basic'

# Uncomment following line if you want document-relative URLs when developing
# RELATIVE_URLS = True

And this is my publishconf.py

#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

# This file is only used if you use `make publish` or
# explicitly specify it as your config file.

import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *

# If your site is available via HTTPS, make sure SITEURL begins with https://
SITEURL = ''
RELATIVE_URLS = False

FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'

DELETE_OUTPUT_DIRECTORY = True

# Following items are often useful when publishing

#DISQUS_SITENAME = ""
#GOOGLE_ANALYTICS = ""

ubuntu 18.04 python3 v.3.6.7 pip v.9.0.1 pelican v.4.0.1

mosra commented 5 years ago

Seems to another case of https://github.com/getpelican/pelican/issues/2442, see the comments there for a solution. Basically all the themes need updating to work correctly with Pelican 4.0.