Python 2.7은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Python 2.7 애플리케이션을 배포할 수 없습니다. 기존 Python 2.7 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Python 버전으로 마이그레이션하는 것이 좋습니다.
Cloud Storage 오류 및 오류 처리
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google Cloud Storage는 App Engine UrlFetch
기능에 의해 액세스됩니다. 결과적으로 발생할 수 있는 오류에는 3가지 원인이 있습니다.
- App Engine UrlFetch 일시적인 오류
- Google Cloud Storage 일시적인 오류
- 버킷 및 객체 승인과 관련된 Google Cloud Storage 오류
Cloud Storage용 App Engine 클라이언트 라이브러리는 App Engine 측과 Google Cloud Storage 측 모두에서 시간 초과 오류를 처리하고 자동으로 재시도를 수행하므로, 이를 처리하기 위한 논리를 앱에 추가할 필요가 없습니다. 제한 시간 및 재시도 메커니즘의 구성은 기본 설정의 일부 또는 전부를 변경할 때 사용하는 RetryParams 클래스를 통해 노출됩니다. 모든 함수 호출에 적용하도록 변경하거나 함수의 retry_params
매개변수를 사용하여 특정 호출의 변경사항을 지정할 수 있습니다.
오류
Cloud Storage용 App Engine 클라이언트 라이브러리에는 다음과 같은 오류 예외 클래스가 정의되어 있습니다.
- cloudstorage.Error
-
이 패키지에 있는 모든 예외의 기본 클래스입니다. App Engine 또는 Google Cloud Storage에서 오류가 생성될 수 있습니다. Google Cloud Storage의 HTTP 오류 코드에 대한 자세한 내용은 Google Cloud Storage 문서의 HTTP 상태 및 오류 코드를 참조하세요.
- cloudstorage.AuthorizationError
- Google Cloud Storage에서 승인되지 않은 요청을 받았습니다. 이 오류는 승인된 앱이 만료된 액세스 토큰을 사용하는 경우 발생할 수 있습니다. 일반적으로 이 오류는 자동으로 처리됩니다. Cloud Storage용 App Engine 클라이언트 라이브러리는 이를 위해 새로운 액세스 토큰을 가져오고 요청을 재시도합니다.
- cloudstorage.ForbiddenError
이 오류(403)는 사용자가 Google Cloud Storage에서 요청할 권한을 승인받지 않았음을 나타냅니다.
- cloudstorage.NotFoundError
- HTTP 오류 404.
cloudstorage.delete()
, cloudstorage.listbucket()
, cloudstorage.open()
또는 cloudstorage.stat()
으로의 호출에 지정한 버킷 또는 객체가 없습니다.
- cloudstorage.TimeoutError
-
이 오류는 재시도를 시도했지만 Google Cloud Storage 서버에 연결하려는 시도가 타임아웃되면 발생합니다. 기본 제한 시간 처리 및 재시도 변경에 대한 자세한 내용은 RetryParams를 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThe App Engine client library for Cloud Storage handles timeout errors and retries automatically, eliminating the need for manual handling in your app.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRetryParams\u003c/code\u003e class allows customization of timeout and retry settings, which can be applied globally or to specific function calls.\u003c/p\u003e\n"],["\u003cp\u003eErrors related to Google Cloud Storage access can stem from transient issues, or from bucket and object authorization, in addition to transient errors coming from App Engine \u003ccode\u003eUrlFetch\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecloudstorage\u003c/code\u003e library defines exception classes like \u003ccode\u003eError\u003c/code\u003e, \u003ccode\u003eAuthorizationError\u003c/code\u003e, \u003ccode\u003eForbiddenError\u003c/code\u003e, \u003ccode\u003eNotFoundError\u003c/code\u003e, and \u003ccode\u003eTimeoutError\u003c/code\u003e to handle various error scenarios.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eForbiddenError\u003c/code\u003e (403) is common when the bucket permissions (bucket ACL) are not configured properly to allow access from the application.\u003c/p\u003e\n"]]],[],null,["# Cloud Storage Errors and Error Handling\n\nGoogle Cloud Storage is accessed by the App Engine ` UrlFetch ` feature. As a result,\nthere are three sources of possible errors:\n\n- App Engine UrlFetch transient errors.\n- Google Cloud Storage transient errors.\n- Google Cloud Storage errors related to buckets and object authorization.\n\nThe App Engine client library for Cloud Storage handles timeout errors on both the App Engine side and\nthe Google Cloud Storage side and performs retries automatically, so your app does not need to\nadd logic to handle this. The configuration of the timeout and retry mechanism\nis exposed through the [RetryParams](/appengine/docs/legacy/standard/python/googlecloudstorageclient/retryparams_class)\nclass, which you can use to change any or all of the default settings. You can\nmake your changes to apply to all function calls or you can specify changes for\na specific call using the function's `retry_params` parameter.\n\nErrors\n------\n\nThe App Engine client library for Cloud Storage has the following error exception classes defined:\n\ncloudstorage.Error\n\n: The base class for all exceptions in this package. Errors can be\n generated from App Engine or from Google Cloud Storage. For details on HTTP\n error codes from Google Cloud Storage, see\n [HTTP Status and Error\n Codes](/storage/docs/reference-status#standardcodes) in the Google Cloud Storage documentation.\n\ncloudstorage.AuthorizationError\n: An unauthorized request was received by Google Cloud Storage. This error can occur if an\n authorized app is using an access token that has expired. Normally, this error\n is handled automatically in the App Engine client library for Cloud Storage, which gets a new access token\n and retries the request.\n\ncloudstorage.ForbiddenError\n\n: This error (403) indicates that the user was not authorized by Google Cloud Storage to\n make the request.\n\n - The various possible causes for this error are listed in the [Google Cloud Storage error\n documentation](/storage/docs/reference-status#standardcodes) for **403-Forbidden**.\n - A common source of this error is that the bucket permissions (bucket ACL) are not set properly to allow your app access. See [Google Cloud Storage Authentication](/storage/docs/authentication) for information on setting up access.\n\n \u003cbr /\u003e\n\ncloudstorage.NotFoundError\n:\n HTTP error 404. The bucket or object you specified in a call to\n `cloudstorage.delete()`, `cloudstorage.listbucket()`,\n `cloudstorage.open()`,\n or `cloudstorage.stat()` does not exist.\n\ncloudstorage.TimeoutError\n:\n This error is raised when the attempt to contact Google Cloud Storage servers times out even\n after retry attempts. (See\n [RetryParams](/appengine/docs/legacy/standard/python/googlecloudstorageclient/retryparams_class)\n for information on changing the default timeout handling and retries."]]