slack-export-viewer icon indicating copy to clipboard operation
slack-export-viewer copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory:

Open odelamp opened this issue 5 years ago • 9 comments

Hiya, I'm unable to get to work, seeing the following: slack-export-viewer -z ./Test.zip /var/folders/gk/bfc6585n3978hhfg5csf21nh0000gq/T/_slackviewer/75b85b8b74ebd38130549f260a1164a277385a61 already exists Traceback (most recent call last): File "/usr/local/bin/slack-export-viewer", line 10, in sys.exit(main()) File "/usr/local/lib/python2.7/site-packages/click/core.py", line 764, in call return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/site-packages/slackviewer/main.py", line 61, in main configure_app(app, archive, channels, no_sidebar, no_external_references, debug) File "/usr/local/lib/python2.7/site-packages/slackviewer/main.py", line 21, in configure_app reader = Reader(path) File "/usr/local/lib/python2.7/site-packages/slackviewer/reader.py", line 21, in init with io.open(os.path.join(self._PATH, "users.json"), encoding="utf8") as f: IOError: [Errno 2] No such file or directory: '/var/folders/gk/bfc6585n3978hhfg5csf21nh0000gq/T/_slackviewer/75b85b8b74ebd38130549f260a1164a277385a61/users.json'

odelamp avatar Nov 01 '19 22:11 odelamp

Please extract Test.zip in your local environment and confirm whether users.json exists or not. It would be helpful if you could check /var/folders/gk/bfc6585n3978hhfg5csf21nh0000gq/T/_slackviewer/75b85b8b74ebd38130549f260a1164a277385a61/users.json

MiraiHattori avatar Nov 11 '19 03:11 MiraiHattori

@odelamp make sure you don't zip the folder containing your channels, but only the channels & files themselves, i.e. the channels and JSON files users.json, channels.json, etc, should be at the root of your .zip archive.

supermitch avatar Jul 06 '20 22:07 supermitch

@supermitch I did what you said, but when I was opening the channels.json.zip it still shows the same thing as it was showed up there? what did I do wrong?

Shuning-Zhang avatar Aug 25 '20 05:08 Shuning-Zhang

I'm having this same issue, I have checked the tmp folder does contain users.json but I see this error regardless :(

hdsheena avatar Dec 07 '20 19:12 hdsheena

My zip was at the wrong level. I had a zip of the containing folder. When I zipped just the contents, problem went away :)

hdsheena avatar Dec 07 '20 21:12 hdsheena

Hello - I have a similar issue but in my case the tmp folder doesn't contain anything. So the error message is legit, I just don't know what to try next. The zip has users.json etc. at the root unless I'm missing something.

From the Cygwin64 terminal: $ slack-export-viewer -z slackexport.zip /tmp/_slackviewer/fd2c7fb58f5761cbdf6086edb4b401198a500a10 already exists Traceback (most recent call last): File "/usr/bin/slack-export-viewer", line 33, in sys.exit(load_entry_point('slack-export-viewer==1.1.4', 'console_scripts', 'slack-export-viewer')()) File "/usr/lib/python3.6/site-packages/click/core.py", line 1128, in call return self.main(*args, **kwargs) File "/usr/lib/python3.6/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/lib/python3.6/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/usr/lib/python3.6/site-packages/slackviewer/main.py", line 61, in main configure_app(app, archive, channels, no_sidebar, no_external_references, debug) File "/usr/lib/python3.6/site-packages/slackviewer/main.py", line 21, in configure_app reader = Reader(path) File "/usr/lib/python3.6/site-packages/slackviewer/reader.py", line 21, in init with io.open(os.path.join(self._PATH, "users.json"), encoding="utf8") as f: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_slackviewer/fd2c7fb58f5761cbdf6086edb4b401198a500a10/users.json'

zip contents: Screen Shot 2022-08-11 at 11 14 30 AM

tmp dir; Screen Shot 2022-08-11 at 11 24 09 AM

I would really appreciate some help with this.

jowebb avatar Aug 11 '22 18:08 jowebb

Figured out my own problem... no idea what was up with the original zip - but simply recreating it (with exactly the same content as before) worked (other than images not rendering and nothing for videos but separate issues). Nice solution overall though - thanks!

jowebb avatar Aug 11 '22 23:08 jowebb

I'm seeing the same issue. It can't find the users.json file, and I just used the normal Slack export command available in the Slack admin screen.

FileNotFoundError: [Errno 2] No such file or directory: '/Users/nateaune/Downloads/SlackExport/users.json'

natea avatar Sep 08 '23 17:09 natea