Comments (4)
Hey @shanness,
I'm currently refactoring this section of the code. I'll take a look at this as well.
Thanks!
from slack-export-viewer.
I changed the code in compile_channels to catch the error
day_messages = json.load(f)
except ValueError as v:
print "Error ",v," with data ",f
Error Extra data: line 33 column 2 - line 60 column 2 (char 1257 - 1952) with data <_io.TextIOWrapper name=u'/tmp/_slackviewer/fabe5eeee0ff9d65446eece86d25dec91615210f/team-site/2017-01-10.json' encoding='utf8'>
Error Extra data: line 33 column 2 - line 60 column 2 (char 1257 - 1952) with data <_io.TextIOWrapper name=u'/tmp/_slackviewer/fabe5eeee0ff9d65446eece86d25dec91615210f/team-site/2017-01-10.json' encoding='utf8'>
And found that json file has two arrays in it. My except block allows me to now load the export.
[
{
"user": "U06TFPM3K",
"text": "<@U06TFPM3K> has joined the channel",
"type": "message",
"subtype": "channel_join",
"ts": "1484049182.000002"
},
{
"user": "U193Y8EH1",
"inviter": "U06TFPM3K",
"text": "<@U193Y8EH1> has joined the channel",
"type": "message",
"subtype": "channel_join",
"ts": "1484049182.000003"
},
{
"user": "U3PGV4H3N",
"inviter": "U06TFPM3K",
"text": "<@U3PGV4H3N> has joined the channel",
"type": "message",
"subtype": "channel_join",
"ts": "1484049183.000004"
},
{
"user": "U06TFPM3K",
"topic": "Pingpad can help you capture shared knowledge, organize and act on it. I will save Posts and Pinned messages as wiki pages automatically for you to <https:\/\/pingpad.io>. Say `help` to get started.",
"text": "<@U06TFPM3K> set the channel topic: Pingpad can help you capture shared knowledge, organize and act on it. I will save Posts and Pinned messages as wiki pages automatically for you to <https:\/\/pingpad.io>. Say `help` to get
started.",
"type": "message",
"subtype": "channel_topic",
"ts": "1484049183.000005"
}
][
{
"user": "U06TFPM3K",
"text": "<@U06TFPM3K> has joined the channel",
"type": "message",
"subtype": "channel_join",
"ts": "1484049182.000002"
},
{
"user": "U193Y8EH1",
"inviter": "U06TFPM3K",
"text": "<@U193Y8EH1> has joined the channel",
"type": "message",
"subtype": "channel_join",
"ts": "1484049182.000003"
},
{
"user": "U06TFPM3K",
"members": [
"U06TFPM3K",
"U193Y8EH1"
],
"text": "<@U06TFPM3K> archived the channel",
"type": "message",
"subtype": "channel_archive",
"ts": "1484049183.000004"
}
]
from slack-export-viewer.
Ta. Worked perfectly! I hacked to to filter only messages with a certain annotation, and only include channels with filtered messages, which was perfect for some reporting we had to do. Thanks for the great codebase, easy to work with!
from slack-export-viewer.
This looks like the same bug that I fixed in #63. @shanness please try the new release 0.6.0 and see if it works.
from slack-export-viewer.
Related Issues (20)
- New release HOT 1
- Offline/local retrieval of data? HOT 1
- Error 500 / KeyError: 'ts' HOT 8
- Integration with slack-exporter?
- Access to local Host Denied HOT 3
- Not able to view the exported dump HOT 6
- slack-export-viewer fails at flask\__init__.py", line 60, in __getattr__ raise AttributeError(name) HOT 9
- Static HTML export fails with AttributeError: 'str' object has no attribute 'mkdir' HOT 5
- Nothing but a Blank Page
- UnicodeEncodeError: 'charmap' codec can't encode character '\u202f' in position 54: character maps to <undefined> encoding with 'cp437' codec failed HOT 4
- Resize sidebar
- slackdump exports aren't viewable using slack-export-viewer HOT 1
- [Feature Request] Allow updating the base URL for reverse proxies
- xxx.zip is not a zipfile
- Feature request: ignore join/leave messages
- Feature request: hide usernames
- CSS is missing when running without external sources
- Viewer will not open
- Bug encoding of urls
- Access to localhost was deniedYou don't have authorization to view this page. HTTP ERROR 403 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-export-viewer.