HttpError 400 어쩌구 'The requested conversion is not supported.'
구글 스프레이드 파일을 받으려하니 자체 포멧(슬라이드, 스프레드시트 등)은 그대로 내보내지 못해서 발생한 오류가 발생했다. 요청한 mimeType으로 내려줄 수 없다는 의미로
https://developers.google.com/drive/api/v3/ref-export-formats
에 나와있는 지원하는 mineType을 지정하면 된다.
request = service.files().get(fileId=item['id'], mimeType='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
요렇게.
'개발 > 파이썬' 카테고리의 다른 글
Flask의 make_response에서 TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a list. (0) | 2021.11.03 |
---|---|
파일 확장자로 mimetype 추측하기 (0) | 2021.02.22 |
Compute engine (우분투 18.04 LTS)에 파이썬 설치 (0) | 2020.12.31 |
Flask-SQLAlchemy에서 secondaryjoin (0) | 2020.12.21 |
Flask-SQLAlchemy의 Column에 subquery 사용 (0) | 2020.12.21 |
댓글