hfaran / slack-export-viewer

A Slack Export archive viewer that allows you to easily view and share your Slack team's export
https://pypi.python.org/pypi/slack-export-viewer
MIT License
966 stars 193 forks source link

TypeError: emojize() got an unexpected keyword argument 'use_aliases' #152

Closed kLy closed 2 years ago

kLy commented 2 years ago

Running 1.1.3 on macOS with pipx. I get this 500 When just starting up the server and loading the root in my browser.

Stack trace:

Traceback (most recent call last):
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/werkzeug/serving.py", line 335, in run_wsgi
    execute(self.server.app)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/werkzeug/serving.py", line 322, in execute
    application_iter = app(environ, start_response)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/app.py", line 2091, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/app.py", line 2076, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/app.py", line 1503, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/slackviewer/app.py", line 91, in index
    return channel_name("general")
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/slackviewer/app.py", line 19, in channel_name
    return flask.render_template("viewer.html", messages=messages,
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/templating.py", line 154, in render_template
    return _render(
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/flask/templating.py", line 128, in _render
    rv = template.render(context)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/slackviewer/templates/viewer.html", line 64, in top-level template code
    {{render_message(message, None, no_external_references)}}
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/jinja2/runtime.py", line 777, in _invoke
    rv = self._func(*arguments)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/slackviewer/templates/util.html", line 26, in template
    {{ message.msg|safe }}
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/jinja2/environment.py", line 485, in getattr
    return getattr(obj, attribute)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/slackviewer/message.py", line 71, in msg
    text = self._formatter.render_text(text)
  File "/Users/quintin/.local/pipx/venvs/slack-export-viewer/lib/python3.10/site-packages/slackviewer/formatter.py", line 71, in render_text
    message = emoji.emojize(message, use_aliases=True)
TypeError: emojize() got an unexpected keyword argument 'use_aliases'
silver198545 commented 2 years ago

I recently installed it myself. Is the version of emoji 2.0.0?

It seems that emoji 2.0.0 is a recent release. You cannot use 'use_aliases'. https://pypi.org/project/emoji/

Changing to "language='alias'" instead will work.