개발/파이썬
Google Drive에서 파일을 받으려는데 The requested conversion is not supported가 난다면
장모
2021. 1. 30. 18:43
HttpError 400 어쩌구 'The requested conversion is not supported.'
구글 스프레이드 파일을 받으려하니 자체 포멧(슬라이드, 스프레드시트 등)은 그대로 내보내지 못해서 발생한 오류가 발생했다. 요청한 mimeType으로 내려줄 수 없다는 의미로
https://developers.google.com/drive/api/v3/ref-export-formats
Google Workspace documents and corresponding export MIME types
Google Workspace formats and supported export MIME types map to each other as follows: Google Doc Format Conversion Format Corresponding MIME type Documents HTML text/html HTML (zipped) application/zip Plain text text/plain Rich text application/rtf Open O
developers.google.com
에 나와있는 지원하는 mineType을 지정하면 된다.
request = service.files().get(fileId=item['id'], mimeType='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
요렇게.