Comments (9)
I got the same error on Windows using Python36, but not on Mac using Python 2.7. The reference in the stack trace to "cp1252.py" is suspicious because we don't want any platform-specific things happening to the nice UTF-8 files.
In my case there were no channels with strange characters in their names, but messages do have them.
from slack-export-viewer.
With Python 3.6, I got rid of this error (probably caused by the characters æøå used by my Norwegian Slack team) by adding encoding="utf-8"
to the relevant calls to open()
in archive.py. I think this breaks compatibility with Python 2, but I haven't tested that. jonathangjertsen@fea797e
from slack-export-viewer.
@BenneyP i have similar problem, and got workaround:
Slack recently added Your channels, your language
feature that allow you to add channel in any languange. So if you have not latin characters in your room name you should exclude that channels from zip file (simply remove from them archive) and remove section with these channels from channels.json
file.
from slack-export-viewer.
Same issue on Windows 10 64bit Python36-64
Here is the only difference in the log:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 10274: character maps to <undefined>
Seems like "<undefined>" was messed up by markdown.
from slack-export-viewer.
Does anyone have a sample json file they'd like to volunteer? Seems like we just need to use the correct encoding when json.load
sing the file (if indeed everyone here is having the same issue).
Should ideally be a relatively simple fix assuming that is the issue.
from slack-export-viewer.
Hi @hfaran!
Thank you for your great job!
Please take a look at the file attached (hf.zip). It produces next error on Windows 10 x64:
C:\XX>slack-export-viewer -z hf.zip
/tmp_slackviewer\1e1584694b283d5f2c098dec43343d00426c2536 already exists
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\program files (x86)\python36-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python36-32\Scripts\slack-export-viewer.EXE_main.py", line 9, in
File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 722, in call
return self.main(*args, **kwargs)
File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\program files (x86)\python36-32\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\program files (x86)\python36-32\lib\site-packages\slackviewer\main.py", line 60, in main
configure_app(app, archive, debug)
File "c:\program files (x86)\python36-32\lib\site-packages\slackviewer\main.py", line 37, in configure_app
channels = compile_channels(path, user_data, channel_data)
File "c:\program files (x86)\python36-32\lib\site-packages\slackviewer\archive.py", line 24, in compile_channels
day_messages = json.load(f)
File "c:\program files (x86)\python36-32\lib\json_init.py", line 296, in load
return loads(fp.read(),
File "c:\program files (x86)\python36-32\lib\encodings\cp1251.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 129: character maps to
hf.zip
I appreciate you fixing the bug.
hf.zip
from slack-export-viewer.
@bartschuller Did you try this with Python 2.7 on Windows?
from slack-export-viewer.
@MikeFoden Sorry, I didn't and it's not easy for me to try.
from slack-export-viewer.
Only took me about a year, but finally got around to running it on my Windows box and fixing the issues. Encoding issue should be fixed!
from slack-export-viewer.
Related Issues (20)
- Add export filter
- New release HOT 1
- Offline/local retrieval of data?
- 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 1
- 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
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.