slack-export-viewer
slack-export-viewer copied to clipboard
TypeError: string indices must be integers
what
- Unable to use
0.8.2
,0.8.1
,0.8.0
,0.7.0
onalpine:3.8
withpython3
installed viapip3
- Export was generated by running https://github.com/hfaran/slack-auto-export (successful!)
output
TypeError: string indices must be integers
/export # slack-export-viewer --archive /export/
Archive already extracted. Viewing from /export...
Traceback (most recent call last):
File "/usr/bin/slack-export-viewer", line 11, in <module>
sys.exit(main())
File "/usr/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/slackviewer/main.py", line 50, in main
configure_app(app, archive, debug)
File "/usr/lib/python3.6/site-packages/slackviewer/main.py", line 19, in configure_app
reader = Reader(path)
File "/usr/lib/python3.6/site-packages/slackviewer/reader.py", line 19, in __init__
self.__USER_DATA = {u["id"]: User(u) for u in json.load(f)}
File "/usr/lib/python3.6/site-packages/slackviewer/reader.py", line 19, in <dictcomp>
self.__USER_DATA = {u["id"]: User(u) for u in json.load(f)}
TypeError: string indices must be integers
Relevant user snippet...
{
"erik": {
"id": "UB2EH889X",
"team_id": "TB2A18NRE",
"name": "erik",
"deleted": false,
"color": "9f69e7",
"real_name": "Erik Osterman",
"tz": "America/Los_Angeles",
"tz_label": "Pacific Standard Time",
"tz_offset": -28800,
Would you mind adding a try catch around that statement and checking what the value of u
is when it errors out? I'm curious to know why it's a string and not a dict and what it contains.