slack-files-delete icon indicating copy to clipboard operation
slack-files-delete copied to clipboard

Script error

Open joanafilipaprc opened this issue 8 years ago • 4 comments

Hey! When running your script, i get this error:

File "main.py", line 28, in <module>
    files = json.loads(content)["files"]
KeyError: 'files'

Can you help me? Thanks!!

joanafilipaprc avatar Jun 05 '16 13:06 joanafilipaprc

I need more details.

What's your Python version? What kind of token are you using?

egermano avatar Jun 06 '16 17:06 egermano

Hi there, i was finally able to put the script working, it says its deleting all the files but they don't disappear..i've tried multiple times to the extent its now saying that there are no files left..

I'm using python 3.5.

Bruno Germano [email protected] escreveu no dia segunda, 6/06/2016 às 18:55:

I need more details.

What's your Python version? What kind of token are you using?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/egermano/slack-files-delete/issues/4#issuecomment-224036431, or mute the thread https://github.com/notifications/unsubscribe/AGuXiVq2p01zClec5B2Hf1Q7bYt6LRYuks5qJF8mgaJpZM4IuW_v .

joanafilipaprc avatar Jun 06 '16 18:06 joanafilipaprc

@joanafilipaprc , you may want to verify what user "owns" the files that are being deleted. I've had to cobble together a script of my own to handle requesting a delete for each individual user's files. While I can appear to see files shared between two users via private message, what I'm seeing in practice is that I can only delete the file if acting as the user that created it. Otherwise, it reports success while failing to actually remove the file.

Sanfam avatar Sep 14 '16 19:09 Sanfam

@joanafilipaprc this script was written to runs on Python 2.7. What @Sanfam said is pretty useful infos.

Try to run in Python 2.7 environment.

Thank you.

egermano avatar Nov 30 '17 19:11 egermano