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
951 stars 192 forks source link

JSON Dump error #51

Closed tscritch closed 6 years ago

tscritch commented 6 years ago

Using python v2.7 python app.py -z MySlackExport.zip

gets this error when extracting the zip:

  File "app.py", line 6, in <module>
    main()
  File "/Library/Python/2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/tscritchfield/Documents/slack-export-viewer/slackviewer/main.py", line 86, in main
    configure_app(app, archive, debug)
  File "/Users/tscritchfield/Documents/slack-export-viewer/slackviewer/main.py", line 43, in configure_app
    path = extract_archive(archive)
  File "/Users/tscritchfield/Documents/slack-export-viewer/slackviewer/archive.py", line 203, in extract_archive
    json.dump(archive_info, f)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
TypeError: must be unicode, not str

Is there another json dump argument or json to fix this? I'll do some research to resolve this today.

tscritch commented 6 years ago

This is fixed using python v3.6. Any suggestions to resolve for v2.7?

hfaran commented 6 years ago

Fixed in 0.3.3! This also prompted me to finally set up CI for this project on Travis. Hopefully breaks between py2 and py3 won't slip through in the future with that :D

tscritch commented 6 years ago

Looks good! Thanks! Yay for CI!