mgaitan / waliki

A wiki engine powered by Django and Git
http://waliki.pythonanywhere.com
BSD 3-Clause "New" or "Revised" License
309 stars 56 forks source link

can't view diffs on LMDE #60

Closed aszepieniec closed 9 years ago

aszepieniec commented 9 years ago

Trying to view the diffs from a page's history causes a server error:

Exception Type: UnicodeDecodeError Exception Value: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128) Exception Location: /usr/local/lib/python2.7/dist-packages/waliki/git/views.py in diff, line 56 Traceback:

File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/waliki/acl.py" in _wrapped_view
  63.                 return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/waliki/git/views.py" in diff
  56.     old_content = Git().version(page, old).replace('\t', '    ').replace(' ', '\xA0')

I am running python 2.7.

aszepieniec commented 9 years ago

Nevermind. After running

python setup.py build

and

python setup.py install

the error disappears. I guess I should have run those commands from the start.