前提・実現したいこと
SLACK APIに日本語を含む画像ファイルをアップロードすると失敗します。
発生している問題・エラーメッセージ
<Response [200]> {"ok":false,"error":"no_file_data"}
該当のソースコード
file_path = './ホゲホゲ/ホゲホゲ.png'
with open(file_path,'rb') as file:
param = {
'token':slack_token,
'channels':channel
}
json_data = requests.post(url="https://slack.com/api/files.upload",params=param,files={'file': file})
print(json_data,json_data.text)
試したこと
.encode('utf-8')
urllib.parse.quote()
補足情報(FW/ツールのバージョンなど)
python 3.6

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。