hfaran / slack-export-viewer

A Slack Export archive viewer that allows you to easily view and share your Slack team's export

Home Page:https://pypi.python.org/pypi/slack-export-viewer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

list: index out of range error - 1.0.0

brucehvn opened this issue · comments

When I'm trying to run slack-export-viewer, I'm getting a 500 error in the browser. The debug output shows an index error trying to retrieve channels[0]. My export is valid and I've viewed it before, so it might be something to do with Python on my system. Maybe some update to Python that changed some behavior?

Ubuntu 18.04.3 LTR 64-bit
Python: 2.7.15+
slack-export-viewer-export: 1.0.0

Traceback (most recent call last):
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/bruce/.local/lib/python2.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/bruce/.local/lib/python2.7/site-packages/slackviewer/app.py", line 89, in index
    return channel_name(channels[0])

Sorry, using wrong export folder.

@brucehvn Can you explain what you did wrong? I'm running into the same issue. channels.json is definitely not empty, and all channels have a name.

@hfaran Please reopen this, this is still a bug. The fix is in #105 (comment)

@turbo #105 is already tracking this bug so we'll leave that open until the PR fixing that one is merged (and leave this issue closed). This is a duplicate of #105 isn't it?