Detlev Zundel
unread,Jan 28, 2021, 5:20:04 PM1/28/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nikola-...@googlegroups.com
Hi,
trying to build my site, I now encounter this problem:
dzu@krikkit:~/blog (master)$ nikola build
Scanning posts.[2021-01-28 23:11:29] ERROR: scan_posts: Error reading post posts/a-mathematicians-lament.rst
[2021-01-28 23:11:29] ERROR: Nikola: Error reading timeline
[2021-01-28 23:11:29] ERROR: Nikola: Error loading tasks. An unhandled exception occurred.
[2021-01-28 23:11:29] ERROR: Nikola: AttributeError: module 'natsort' has no attribute 'natsorted'
[2021-01-28 23:11:29] WARNING: Nikola: To see more details, run Nikola in debug mode (set environment variable NIKOLA_DEBUG=1) or use NIKOLA_SHOW_TRACEBACKS=1
dzu@krikkit:~/blog (master)$ pip3 list | grep 'natsort\|Nikola'
natsort 7.1.0
Nikola 8.1.2
dzu@krikkit:~/blog (master)$
This is Nikola v8.1.2 running on Debian testing. Looking around I see
that python3 is having problems doing an import statement that I believe
should work:
dzu@krikkit:~$ python3
Python 3.9.1+ (default, Jan 20 2021, 14:49:22)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from natsort import natsorted
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'natsorted' from 'natsort' (/home/dzu/.local/lib/python3.9/site-packages/natsort/__init__.py)
>>>
dzu@krikkit:~$
It works nicely in python2:
dzu@krikkit:~/blog (master)$ python2
Python 2.7.18 (default, Apr 20 2020, 20:30:41)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from natsort import natsorted
>>>
dzu@krikkit:~/blog (master)$
Does anyone have a clue for me on how to fix this to make Nikola work
again?
Thanks in advance
Detlev
--
Any fool can write code that a computer can understand. Good
programmers write code that humans can understand.
-- Martin Fowler