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
901 stars 189 forks source link

slack-export-viewer doesnt work with recent version of werkzeug #157

Closed harpomaxx closed 8 months ago

harpomaxx commented 1 year ago

I've installed slack-export-viewer using pip and pipx and in both cases, I've got the error

Traceback (most recent call last):
  File "/home/harpo/.local/bin/slack-export-viewer", line 8, in <module>
    sys.exit(main())
  File "/home/harpo/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/harpo/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/harpo/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/harpo/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/harpo/.local/lib/python3.8/site-packages/slackviewer/main.py", line 63, in main
    configure_app(app, archive, channels, no_sidebar, no_external_references, debug)
  File "/home/harpo/.local/lib/python3.8/site-packages/slackviewer/main.py", line 26, in configure_app
    top.channels = reader.compile_channels(channels)
AttributeError: 'LocalStack' object has no attribute 'channels'

Looking at stackoverflow I found a mention about this similar issue. It seems that has something to do with a recent update to the werkzeug library. As suggested in at StackOverflow I forced the installation of a previous version of werkzeug

pip3 install werkzeug==v2.0.3 

and now it is working perfectly !!!

Damnum commented 1 year ago

@harpomaxx did you do anything else? I've installed werkzeug 2.0.3 and I'm still getting the same error

ronnydw commented 1 year ago

Same for me, still have the error after installing werkzeug 2.0.3

MakingSpiderSense commented 1 year ago

Worked for me after installing 2.0.3. Thanks!

I had to run pip install werkzeug==v2.0.3. You can confirm the installation and version with the pip list command.

stiltr commented 1 year ago

Worked for me with: pipx runpip slack-export-viewer install werkzeug==v2.0.3

ronnydw commented 1 year ago

Thanks @stiltr , indeed it works with werkzeug v2.0.3. I tried with werkzeug v2.2.0 which didn't work

k-y commented 8 months ago

For anyone else who stumbles upon this in 2023+, in order for this combination to work, you'll need: flask==2.1.3 werkzeug==2.0.3

hfaran commented 8 months ago

Latest version pinned to <3.0.0 so this shouldn't happen anymore