mosra / m.css

A no-nonsense, no-JavaScript CSS framework, site and documentation theme for content-oriented websites
https://mcss.mosra.cz
Other
409 stars 92 forks source link

CRITICAL: SyntaxError: Non-ASCII character (fix) #43

Closed beleriandcrises closed 6 years ago

beleriandcrises commented 6 years ago

Hello, first, I love the idea of the theme, we really need more lightweight, content oriented stuff. Good job, thanks!

EDIT: the real, very real origin of this bug is that I had pelican from python 2.7, not python3 (as pip installed that as default). The error doesn't rise after removing pelican and reinstalling it from pip3. I apologise.

Now, for the issue.

A fresh pelican-quickstart and the mcss repo cloned, so nothing missing (Pelican: 3.7.1)

:$ pelican content
CRITICAL: SyntaxError: Non-ASCII character '\xc2' in file /home/user/arteteco-mcss/m.css/pelican-plugins/m/__init__.py on line 4, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (__init__.py, line 4)

I solved it by adding the coding to the beginning of the file. This should be in theory done with all files, I guess?

# -*- coding: utf-8 -*-

Afterwards I had different error trying to generate the website, I'll paste it here but maybe is better to open another issue for it?

CRITICAL: TypeError: ord() expected a character, but string of length 6 found

mosra commented 6 years ago

Hi,

just saw the edit: yes, Python 3 is required (personal reason: I don't have the capacity to mainain both Py2 and Py3 compatibility, hope you understand).

If you have a suggestion where else should I mention this requirement (though I think it's mentioned quite enough already), I'll happily update the docs :)

mosra commented 6 years ago

Closing as resolved.