isso-comments / isso

a Disqus alternative
https://isso-comments.de
MIT License
5.03k stars 440 forks source link

Isso does not work with misaka 2.0.0 #208

Closed noqqe closed 8 years ago

noqqe commented 8 years ago

Hey,

I upgraded isso and my OpenBSD recently.

sudo pip2.7 install --upgrade isso
...
Collecting misaka (from isso)                                                                                                                                 [6396/6806]
  Downloading misaka-2.0.0.tar.gz (121kB)
    100% |████████████████████████████████| 122kB 295kB/s
Installing collected packages: pycparser, cffi, misaka, isso, six
  Found existing installation: misaka 1.0.2
    Uninstalling misaka-1.0.2:
      Successfully uninstalled misaka-1.0.2
  Running setup.py install for misaka

This was resulting in a new version of misaka. Lib was upgraded from 1.0.2 to 2.0.0.

But when your try access comments, this error appears in the logs:

2015-10-25 12:55:06,021 ERROR: GET /
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/isso/__init__.py", line 136, in dispatch
    response = handler(request.environ, request, **values)
  File "/usr/local/lib/python2.7/site-packages/isso/views/__init__.py", line 45, in dec
    return func(cls, env, req, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/isso/views/comments.py", line 421, in fetch
    'replies'        : self._process_fetched_list(root_list, plain)
  File "/usr/local/lib/python2.7/site-packages/isso/views/comments.py", line 464, in _process_fetched_list
    item['text'] = self.isso.render(item['text'])
  File "/usr/local/lib/python2.7/site-packages/isso/__init__.py", line 114, in render
    return self.markup.render(text)
  File "/usr/local/lib/python2.7/site-packages/isso/utils/html.py", line 102, in render
    return self._render(text)
  File "/usr/local/lib/python2.7/site-packages/isso/utils/html.py", line 99, in <lambda>
    self._render = lambda text: sanitize(sanitizer, parser(text))
  File "/usr/local/lib/python2.7/site-packages/isso/utils/html.py", line 69, in inner
    rv = md.render(text).rstrip("\n")
AttributeError: 'Markdown' object has no attribute 'render'

I fixed this by downgrading misaka to 1.0.2 again.

pip2.7 install misaka==1.0.2
You are using pip version 7.1.0, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting misaka==1.0.2
  Downloading misaka-1.0.2.tar.gz (78kB)
    100% |████████████████████████████████| 81kB 175kB/s
Installing collected packages: misaka
  Found existing installation: misaka 2.0.0
    Uninstalling misaka-2.0.0:
      Successfully uninstalled misaka-2.0.0
  Running setup.py install for misaka
Successfully installed misaka-1.0.2

The misaka version should probably be clearly referenced in setup.py

jilljenn commented 8 years ago

Thank you! I got the same exact problem. Indeed, Misaka 2.0.0 was released quite recently (2015-10-22).

I'm going to try to fix the misaka.Markdown calls to use a version which works with Python 3.4 and Misaka 2.0.0.

ghost commented 8 years ago

I had the same error. Downgrading with "pip install misaka==1.0.2" worked.

marqpdx commented 8 years ago

I can affirm that teamdoom's note is correct: Downgrading with "pip install misaka==1.0.2" worked.

elrac commented 8 years ago

I had the same issue, and pip install misaka==1.0.2 fixed it.

posativ commented 8 years ago

This has been fixed in 0.10 and is already available on PyPi!