-
AttributeError: 'module' object has no attribute 'WebClient'IT 2020. 7. 8. 11:01
client = slack.WebClient(token='xoxb-')
response = client.files_upload(
channels="#general",
file='/home/onone/onone.png',
title='capture1.png',
filetype='capture1.png'
)
assert response["ok"]
↓ 변경
import requests
url = ''
files = {'file': open('/home/one.png, 'rb')}
r = requests.post(url, files=files)
r.text
'IT' 카테고리의 다른 글