getnikola / nikola

A static website and blog generator
https://getnikola.com/
MIT License
2.62k stars 450 forks source link

AttributeError: 'NoneType' object has no attribute 'has_section' #1086

Closed gilgamezh closed 10 years ago

gilgamezh commented 10 years ago

In a fresh install of Nikola (virtualenv, python 3.3.4). I'm having this error for every command:

(nikola) ~VIRTUAL_ENV  nikola help     
[2014-03-01T20:12:57Z] WARNING: Nikola: Could not guess locale for language en, using locale C
Traceback (most recent call last):
  File "/home/gilgamezh/code/nikola/bin/nikola", line 37, in <module>
    sys.exit(__main__.main(sys.argv[1:]))
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/nikola/__main__.py", line 91, in main
    site = Nikola(**config)
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/nikola/nikola.py", line 381, in __init__
    self.plugin_manager.collectPlugins()
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/yapsy/PluginManager.py", line 527, in collectPlugins
    self.locatePlugins()
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/yapsy/PluginManager.py", line 442, in locatePlugins
    self._candidates, npc = self.getPluginLocator().locatePlugins()
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 430, in locatePlugins
    plugin_info = self._getInfoForPluginFromAnalyzer(analyzer, dirpath, filename)
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 384, in _getInfoForPluginFromAnalyzer
    plugin_info_dict,config_parser = analyzer.getInfosDictFromPlugin(dirpath, filename)
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 262, in getInfosDictFromPlugin
    infos, config_parser = self._extractBasicPluginInfo(dirpath, filename)
  File "/home/gilgamezh/code/nikola/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 241, in _extractBasicPluginInfo
    if config_parser.has_section("Documentation"):
AttributeError: 'NoneType' object has no attribute 'has_section'

I'm running Archlinux and i installed Nikola in a virtualenv with "git clone"+pip. The same error appears installing Nikola with pip out of the virtualenv.

(nikola) ✘  ~VIRTUAL_ENV  pip show yapsy  

---
Name: Yapsy
Version: 1.10.223
Location: /home/gilgamezh/code/nikola/lib/python3.3/site-packages
Requires: 
(nikola) ~VIRTUAL_ENV  python --version
Python 3.3.4
nikola) ~VIRTUAL_ENV  pip show nikola

---
Name: Nikola
Version: 6.4.0
Location: /home/gilgamezh/code/nikola/lib/python3.3/site-packages
Requires: doit, pygments, pillow, docutils, mako, unidecode, lxml, yapsy, PyRSS2Gen, pytz, logbook, blinker, setuptools, colorama

i'm willing to help with any tests that you need. :smile:

Kwpolska commented 10 years ago

I’m an Archer, so I probably can reproduce it myself… to be fair, the Python 3 version is not always tested by a human (Python 2 is more likely to be tested), though Travis did not fail for the last builds.

Kwpolska commented 10 years ago

Cannot reproduce. Have you installed any custom plugins? How did you install it, exactly? What have you changed in the config file?

[kwpolska@kw-cassandra /tmp]% virtualenv3 n3                             /tmp 0
Using base prefix '/usr'
New python executable in n3/bin/python3
Also creating executable in n3/bin/python
Installing setuptools, pip...done.
[kwpolska@kw-cassandra /tmp]% cd n3                                      /tmp 0
[kwpolska@kw-cassandra n3]% git clone git@github.com:getnikola/nikola.git
Cloning into 'nikola'...
remote: Counting objects: 24082, done.
remote: Compressing objects: 100% (10536/10536), done.
remote: Total 24082 (delta 13733), reused 23497 (delta 13204)
Receiving objects: 100% (24082/24082), 7.84 MiB | 1.17 MiB/s, done.
Resolving deltas: 100% (13733/13733), done.
Checking connectivity... done.
[kwpolska@kw-cassandra n3]% source bin/activate                       /tmp/n3 0
(n3)[kwpolska@kw-cassandra n3]% python --version                      /tmp/n3 0
Python 3.3.4
(n3)[kwpolska@kw-cassandra n3]% cd nikola                             /tmp/n3 0
(n3)[kwpolska@kw-cassandra nikola Gmaster]% pip install .      /tmp/n3/nikola 0
[…snip…]
Successfully installed doit pygments pillow docutils mako unidecode lxml yapsy PyRSS2Gen pytz logbook blinker colorama Nikola six pyinotify MarkupSafe
Cleaning up...
(n3)[kwpolska@kw-cassandra nikola Gmaster]% nikola help        /tmp/n3/nikola 0
Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com/

Available commands:
  nikola auto                 automatically detect site changes, rebuild and optionally refresh a browser
[…snip…]
  nikola help                 show help / reference
  nikola help <command>       show command usage
  nikola help <task-name>     show task usage
(n3)[kwpolska@kw-cassandra nikola Gmaster]% nikola init --demo n
[2014-03-02 09:54] INFO: init: A new site with example data has been created at n.
[2014-03-02 09:54] INFO: init: See README.txt in that folder for more information.
(n3)[kwpolska@kw-cassandra nikola Gmaster*]% cd n              /tmp/n3/nikola 0
(n3)[kwpolska@kw-cassandra n Gmaster*]% nikola build         /tmp/n3/nikola/n 0
Scanning posts....done!
.  render_galleries:output/galleries
[…snip…]
.  create_bundles:output/assets/js/all.js
(n3)[kwpolska@kw-cassandra n Gmaster*]%                      /tmp/n3/nikola/n 0
gilgamezh commented 10 years ago

Hi! i'm not have custom plugins. But I ran "pip install -r requirements-full.txt " before to "pip install ." I'll try to install in the same way that you do. I'll try python2 also.

Kwpolska commented 10 years ago

Couldn’t reproduce with that either. But yes — try to install this way. Or, better yet, provide me with a tarball of your virtualenv.

gilgamezh commented 10 years ago

Oka! here is the virtualenv with the error: https://dl.dropboxusercontent.com/u/23574728/nikola_gilgamezh.tar.gz I forgot this : I have not made changes in the config file.

Here is the new test. (whit the same error):

 ~/code  virtualenv3 nikola_test
Using base prefix '/usr'
New python executable in nikola_test/bin/python3
Also creating executable in nikola_test/bin/python
Installing setuptools, pip...done.
 ~/code  cd nikola_test                          
 ~/code/nikola_test  git clone git://github.com/getnikola/nikola.git
Cloning into 'nikola'...
remote: Counting objects: 24093, done.
remote: Compressing objects: 100% (10547/10547), done.
remote: Total 24093 (delta 13742), reused 23497 (delta 13204)
Receiving objects: 100% (24093/24093), 7.84 MiB | 1.04 MiB/s, done.
Resolving deltas: 100% (13742/13742), done.
Checking connectivity... done.
 ~/code/nikola_test  source bin/activate
(nikola_test) ~VIRTUAL_ENV  python --version
Python 3.3.4
(nikola_test) ~VIRTUAL_ENV  cd nikola 
(nikola_test) ~VIRTUAL_ENV/nikola  ± master   pip install .

...... ALL THE INSTALL STUFF ....

eneric -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -I/usr/include/python3.3m -c markupsafe/_speedups.c -o build/temp.linux-x86_64-3.3/markupsafe/_speedups.o
    gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-3.3/markupsafe/_speedups.o -L/usr/lib -lpython3.3m -o build/lib.linux-x86_64-3.3/markupsafe/_speedups.cpython-33m.so
Successfully installed doit pygments pillow docutils mako unidecode lxml yapsy PyRSS2Gen pytz logbook blinker colorama Nikola six pyinotify MarkupSafe
Cleaning up...
(nikola_test) ~VIRTUAL_ENV/nikola  ± master   nikola help
[2014-03-02T14:02:43Z] WARNING: Nikola: Could not guess locale for language en, using locale C
Traceback (most recent call last):
  File "/home/gilgamezh/code/nikola_test/bin/nikola", line 37, in <module>
    sys.exit(__main__.main(sys.argv[1:]))
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/__main__.py", line 91, in main
    site = Nikola(**config)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/nikola.py", line 381, in __init__
    self.plugin_manager.collectPlugins()
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginManager.py", line 527, in collectPlugins
    self.locatePlugins()
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginManager.py", line 442, in locatePlugins
    self._candidates, npc = self.getPluginLocator().locatePlugins()
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 430, in locatePlugins
    plugin_info = self._getInfoForPluginFromAnalyzer(analyzer, dirpath, filename)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 384, in _getInfoForPluginFromAnalyzer
    plugin_info_dict,config_parser = analyzer.getInfosDictFromPlugin(dirpath, filename)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 262, in getInfosDictFromPlugin
    infos, config_parser = self._extractBasicPluginInfo(dirpath, filename)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 241, in _extractBasicPluginInfo
    if config_parser.has_section("Documentation"):
AttributeError: 'NoneType' object has no attribute 'has_section'
Kwpolska commented 10 years ago

It works fine with your virtualenv. Could you try:

        infos, config_parser = self._extractBasicPluginInfo(dirpath, filename)
        # collect additional (but usually quite usefull) information
        print(infos)
        if config_parser.has_section("Documentation"):
gilgamezh commented 10 years ago

I'm back! "running it with a clean shell, like sh -l?" Same error.

Here is de output printing de "infos"

(nikola_test)[gilgamezh@Trantor nikola_test]$ nikola help
[2014-03-04T00:03:54Z] WARNING: Nikola: Could not guess locale for language en, using locale C
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/template/mako', 'name': 'mako'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/template/jinja', 'name': 'jinja'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/textile', 'name': 'textile'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/wiki', 'name': 'wiki'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/asciidoc', 'name': 'asciidoc'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/misaka', 'name': 'misaka'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/html', 'name': 'html'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/txt2tags', 'name': 'txt2tags'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/bbcode', 'name': 'bbcode'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest', 'name': 'rest'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/pandoc', 'name': 'pandoc'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/markdown', 'name': 'markdown'}
{'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/php', 'name': 'php'}
None
Traceback (most recent call last):
  File "/home/gilgamezh/code/nikola_test/bin/nikola", line 37, in <module>
    sys.exit(__main__.main(sys.argv[1:]))
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/__main__.py", line 91, in main
    site = Nikola(**config)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/nikola.py", line 381, in __init__
    self.plugin_manager.collectPlugins()
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginManager.py", line 527, in collectPlugins
    self.locatePlugins()
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginManager.py", line 442, in locatePlugins
    self._candidates, npc = self.getPluginLocator().locatePlugins()
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 431, in locatePlugins
    plugin_info = self._getInfoForPluginFromAnalyzer(analyzer, dirpath, filename)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 385, in _getInfoForPluginFromAnalyzer
    plugin_info_dict,config_parser = analyzer.getInfosDictFromPlugin(dirpath, filename)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 263, in getInfosDictFromPlugin
    infos, config_parser = self._extractBasicPluginInfo(dirpath, filename)
  File "/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/yapsy/PluginFileLocator.py", line 242, in _extractBasicPluginInfo
    if config_parser.has_section("Documentation"):
AttributeError: 'NoneType' object has no attribute 'has_section'
(nikola_test)[gilgamezh@Trantor nikola_test]$ 

I'm thinking (as you said) that maybe is a problem with de locales settings. (see the Warning). I'll try changing my locales config and test again. I'll write you soon

(nikola_test) ~VIRTUAL_ENV  locale
LANG=es_AR.utf8
LC_CTYPE=es_AR.utf8
LC_NUMERIC="es_AR.utf8"
LC_TIME="es_AR.utf8"
LC_COLLATE="es_AR.utf8"
LC_MONETARY="es_AR.utf8"
LC_MESSAGES="es_AR.utf8"
LC_PAPER="es_AR.utf8"
LC_NAME="es_AR.utf8"
LC_ADDRESS="es_AR.utf8"
LC_TELEPHONE="es_AR.utf8"
LC_MEASUREMENT="es_AR.utf8"
LC_IDENTIFICATION="es_AR.utf8"
LC_ALL=
gilgamezh commented 10 years ago

Definitlely is something with de locales. Looking this issue #884 I modified nikola.py in the line 161:

           'DATE_FORMAT': '%Y-%m-%d %H:%M',
            'DEFAULT_LANG': "es_AR",
            'DEPLOY_COMMANDS': [],
            'DISABLED_PLUGINS': (),

Then it works!

(nikola_test) ~VIRTUAL_ENV  nikola help
{'name': 'mako', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/template/mako'}
{'name': 'jinja', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/template/jinja'}
{'name': 'textile', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/textile'}
{'name': 'wiki', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/wiki'}
{'name': 'asciidoc', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/asciidoc'}
{'name': 'misaka', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/misaka'}
{'name': 'html', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/html'}
{'name': 'txt2tags', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/txt2tags'}
{'name': 'bbcode', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/bbcode'}
{'name': 'rest', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest'}
{'name': 'pandoc', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/pandoc'}
{'name': 'markdown', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/markdown'}
{'name': 'php', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/php'}
{'name': 'ipynb', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/ipynb'}
{'name': 'rest_slides', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/slides'}
{'name': 'rest_gist', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/gist'}
{'name': 'rest_listing', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/listing'}
{'name': 'rest_doc', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/doc'}
{'name': 'rest_soundcloud', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/soundcloud'}
{'name': 'rest_youtube', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/youtube'}
{'name': 'rest_post_list', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/post_list'}
{'name': 'rest_vimeo', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/vimeo'}
{'name': 'rest_chart', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/chart'}
{'name': 'rest_media', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/compile/rest/media'}
{'name': 'stderr', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/loghandler/stderr'}
{'name': 'smtp', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/loghandler/smtp'}
{'name': 'new_post', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/new_post'}
{'name': 'check', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/check'}
{'name': 'orphans', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/orphans'}
{'name': 'auto', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/auto'}
{'name': 'mincss', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/mincss'}
{'name': 'bootswatch_theme', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/bootswatch_theme'}
{'name': 'deploy', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/deploy'}
{'name': 'new_page', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/new_page'}
{'name': 'serve', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/serve'}
{'name': 'init', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/init'}
{'name': 'import_feed', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/import_feed'}
{'name': 'install_theme', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/install_theme'}
{'name': 'console', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/console'}
{'name': 'import_wordpress', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/import_wordpress'}
{'name': 'planetoid', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/planetoid'}
{'name': 'version', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/version'}
{'name': 'import_blogger', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/import_blogger'}
{'name': 'install_plugin', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/command/install_plugin'}
{'name': 'render_indexes', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/indexes'}
{'name': 'render_tags', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/tags'}
{'name': 'render_archive', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/archive'}
{'name': 'render_mustache', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/mustache'}
{'name': 'render_listings', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/listings'}
{'name': 'build_sass', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/build_sass'}
{'name': 'render_galleries', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/galleries'}
{'name': 'copy_assets', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/copy_assets'}
{'name': 'render_posts', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/posts'}
{'name': 'render_sources', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/sources'}
{'name': 'render_pages', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/pages'}
{'name': 'gzip', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/gzip'}
{'name': 'copy_files', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/copy_files'}
{'name': 'build_less', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/build_less'}
{'name': 'sitemap', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/sitemap'}
{'name': 'create_bundles', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/bundles'}
{'name': 'local_search', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/localsearch'}
{'name': 'generate_rss', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/rss'}
{'name': 'redirect', 'path': '/home/gilgamezh/code/nikola_test/lib/python3.3/site-packages/nikola/plugins/task/redirect'}
[2014-03-04T00:21:57Z] WARNING: Nikola: In order to USE_BUNDLES, you must install the "webassets" Python package.
[2014-03-04T00:21:57Z] WARNING: Nikola: Setting USE_BUNDLES to False.
Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com/

Available commands:
  nikola auto                 automatically detect site changes, rebuild and optionally refresh a browser
  nikola bootswatch_theme     given a swatch name from bootswatch.com and a parent theme, creates a custom theme
  nikola build                run tasks
  nikola check                check links and files in the generated site
  nikola clean                clean action / remove targets
  nikola console              start an interactive Python console with access to your site
  nikola deploy               deploy the site
  nikola doit_auto            automatically execute tasks when a dependency changes
  nikola dumpdb               dump dependency DB
  nikola forget               clear successful run status from internal DB
  nikola help                 show help
  nikola ignore               ignore task (skip) on subsequent runs
  nikola import_blogger       import a blogger dump
  nikola import_feed          import a RSS/Atom dump
  nikola import_wordpress     import a WordPress dump
  nikola init                 create a Nikola site in the specified folder
  nikola install_plugin       install plugin into current site
  nikola install_theme        install theme into current site
  nikola list                 list tasks from dodo file
  nikola mincss               apply mincss to the generated site
  nikola new_page             create a new page in the site
  nikola new_post             create a new blog post or site page
  nikola orphans              list all orphans
  nikola run                  run tasks
  nikola serve                start the test webserver
  nikola strace               use strace to list file_deps and targets
  nikola tabcompletion        generate script for tab-complention
  nikola version              print the Nikola version number

  nikola help                 show help / reference
  nikola help <command>       show command usage
  nikola help <task-name>     show task usage
(nikola_test) ~VIRTUAL_ENV  

Maybe some issue with the iPython notebook plugin?

gilgamezh commented 10 years ago

For the record. Works with python2.

(nikola_python2) ~VIRTUAL_ENV/nikola  ± master   nikola help
[2014-03-04T01:07:13Z] WARNING: Nikola: Could not guess locale for language en, using locale C
[2014-03-04T01:07:14Z] WARNING: Nikola: In order to USE_BUNDLES, you must install the "webassets" Python package.
[2014-03-04T01:07:14Z] WARNING: Nikola: Setting USE_BUNDLES to False.
Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com/

Available commands:
  nikola auto                 automatically detect site changes, rebuild and optionally refresh a browser
  nikola bootswatch_theme     given a swatch name from bootswatch.com and a parent theme, creates a custom theme
  nikola build                run tasks
  nikola check                check links and files in the generated site
.......
Kwpolska commented 10 years ago

Have you configured an English locale in /etc/locale.gen? If not, please do and run locale-gen and tell me if it works.

Also, I can’t see anything in ipynb that would break this way.

gilgamezh commented 10 years ago

I haven't got an English locale. I have just tried configuring one and then Nikola works ok. This is my locales now:

 (nikola) ~VIRTUAL_ENV  locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8
es_AR
es_AR.iso88591
es_AR.utf8

I knew this will happen, but i think most of the people will have the locales configured with only one locale (as in the #884 issue). Do you think that it should be a warning in the docs?

Kwpolska commented 10 years ago

I think it would be better to fix this (and make it work with any locales). Sadly, I do not have much experience with the locale system…

cc @ccanepa

devurandom commented 10 years ago

I ran into the same problem, but I do have an english locale installed:

# locale -a
C
en_GB
en_GB.iso88591
en_GB.utf8
POSIX
Kwpolska commented 10 years ago

@devurandom en_US is what we want. Also, can you reproduce it with the fix from #1305?

devurandom commented 10 years ago

I needed to add a locale supporting Nikola's DEFAULT_LANG to /etc/locale.gen and then run locale-gen.

The error message I got (before adding the de locale) was:

[2014-06-02T18:50:20Z] WARNING: Nikola: Could not guess locale for language de, using locale C

I think this is caused by what #1305 mentions:

Fallback to C fails in some cases, for example:

  • UTF-8 .plugin files (#1304)