Code Monkey home page Code Monkey logo

Comments (10)

tscritch avatar tscritch commented on June 25, 2024

Hey @accuratefeed can you add your channels.json file or a snippet of it. The only reason I can see this happening is because there are no channels at all. But if that's not the case I can test with your data.
Thanks!

from slack-export-viewer.

accuratefeed avatar accuratefeed commented on June 25, 2024

Hi @tscritch thanks for replying so quickly. The channels.json file is indeed empty. I contacted slack about this and they're not sure why it's empty either. I do have the folder of the channel I'm trying to view though and the other json files such as users.json has data in it. I'm really just trying to put this 1 channel in a viewable format, so if you have any other suggestions, please let me know!

from slack-export-viewer.

tscritch avatar tscritch commented on June 25, 2024

Wow. Interesting! haha
Well the list of channels is created from that channels.json so we need it... I would suggest for now just manually creating the file. Go to the tests folder in this project and open the zip to find the channels.json and just copy one from there. I'm not sure what else you could do if you don't have data in that file.

from slack-export-viewer.

accuratefeed avatar accuratefeed commented on June 25, 2024

@tscritch I was able to find a channels.json with data in it. Now I'm getting the following error:

PS C:\Users\AccurateFeed\downloads> slack-export-viewer --archive ldrs.zip ldrs.zip extracting to C:\Users\AccurateFeed\AppData\Local\Temp\2\_slackviewer\25cc1dfe34b348f9bc8e83888e92fcff8f708853... ldrs.zip extracted to C:\Users\AccurateFeed\AppData\Local\Temp\2\_slackviewer\25cc1dfe34b348f9bc8e83888e92fcff8f708853. Traceback (most recent call last): File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\AccurateFeed\AppData\Local\Programs\Python\Python36-32\Scripts\slack-export-viewer.exe\__main__.py", line 9, in <module> File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 722, in __call__ return self.main(*args, **kwargs) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 697, in main rv = self.invoke(ctx) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 535, in invoke return callback(*args, **kwargs) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\slackviewer\main.py", line 76, in main configure_app(app, archive, debug) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\slackviewer\main.py", line 41, in configure_app groups = compile_groups(path, user_data, group_data) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\site-packages\slackviewer\archive.py", line 67, in compile_groups day_messages = json.load(f) File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\json\__init__.py", line 296, in load return loads(fp.read(), File "c:\users\AccurateFeed\appdata\local\programs\python\python36-32\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 428: character maps to <undefined>

from slack-export-viewer.

tscritch avatar tscritch commented on June 25, 2024

Ah jeez haha it looks like that would be a character it can't read for some reason... I'm not too experienced with that stuff. @hfaran any insight?

from slack-export-viewer.

accuratefeed avatar accuratefeed commented on June 25, 2024

I was able to get what I needed using levelsio's script, which I believe this script was based off of. Any idea if hfaran's script is using utf8 or latin1 to decode? Just curious.

from slack-export-viewer.

tscritch avatar tscritch commented on June 25, 2024

Ok great.
It is using utf8 👍

from slack-export-viewer.

hfaran avatar hfaran commented on June 25, 2024

@tscritch Looking at the stack trace that @accuratefeed posted, the bug is here:

with io.open(os.path.join(self._PATH, day)) as f:
# loads all messages
day_messages = json.load(f)

You're missing the encoding="utf8" argument on io.open

from slack-export-viewer.

hfaran avatar hfaran commented on June 25, 2024

Committed the fix, but I'm gonna wait until your next PR goes to make a new release

from slack-export-viewer.

hfaran avatar hfaran commented on June 25, 2024

Actually, I went ahead and released 0.6.0. @accuratefeed please try it

from slack-export-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.