이 페이지에서는 인증 및 승인과 관련하여 발생할 수 있는 몇 가지 일반적인 문제를 설명합니다.
This app isn't verified
OAuth 동의 화면에 '이 앱은 인증되지 않았습니다'라는 경고가 표시되면 앱이 민감한 사용자 데이터에 대한 액세스 권한을 제공하는 범위를 요청하고 있는 것입니다. 애플리케이션에서 민감한 범위를 사용하는 경우 해당 경고 및 기타 제한사항을 삭제하려면 앱이 인증 절차를 거쳐야 합니다. 개발 단계에서는 고급 > {프로젝트 이름}(안전하지 않음)으로 이동을 선택하여 이 경고를 무시할 수 있습니다.
File not found error for credentials.json
코드 샘플을 실행할 때 credentials.json에 관한 '파일을 찾을 수 없음' 또는 '이러한 파일 없음' 오류 메시지가 표시될 수 있습니다.
이 오류는 데스크톱 애플리케이션 사용자 인증 정보를 승인하지 않은 경우에 발생합니다. 데스크톱 애플리케이션의 사용자 인증 정보를 만드는 방법을 알아보려면 사용자 인증 정보 만들기로 이동하세요.
사용자 인증 정보를 만든 후 다운로드한 JSON 파일이 credentials.json로 저장되었는지 확인합니다. 그런 다음 파일을 작업 디렉터리로 이동합니다.
Token has been expired or revoked
코드 샘플을 실행하면 '토큰이 만료되었습니다' 또는 '토큰이 취소되었습니다' 오류 메시지가 표시될 수 있습니다.
이 오류는 Google 승인 서버의 액세스 토큰이 만료되었거나 취소된 경우 발생합니다. 가능한 원인과 해결 방법에 대한 자세한 내용은 갱신 토큰 만료를 참고하세요.
Python 오류
다음은 몇 가지 일반적인 Python 오류입니다.
AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlparse'
이 오류는 Mac OSX에서 Python 라이브러리의 종속 항목인 six 모듈의 기본 설치가 pip에서 설치한 모듈보다 먼저 로드되는 경우 발생할 수 있습니다. 이 문제를 해결하려면 pip의 설치 위치를 PYTHONPATH 시스템 환경 변수에 추가하세요.
pip의 설치 위치를 확인합니다.
pip show six | grep "Location:" | cut -d " " -f2
다음 단계에서 필요하므로 이 위치를 기록해 둡니다.
~/.bashrc 파일에 다음 줄을 추가하고 INSTALL_PATH를 이전 단계에서 결정한 위치로 바꿉니다.
export PYTHONPATH=$PYTHONPATH:INSTALL_PATH
~/.bashrc 파일을 새로고침합니다.
source ~/.bashrc
TypeError: sequence item 0: expected str instance, bytes found
이 오류는 httplib2의 버그로 인해 발생합니다. 이 문제를 해결하려면 최신 버전의 httplib2로 업그레이드하세요.
pip install --upgrade httplib2
Cannot uninstall 'six'
pip install 명령어를 실행할 때 다음 오류가 표시될 수 있습니다.
Cannot uninstall 'six'. It is a distutils installed project and thus we
cannot accurately determine which files belong to it which would lead to
only a partial uninstall.
이 오류는 pip가 사전 설치된 six 패키지를 업그레이드하려고 할 때 Mac OSX에서 발생합니다. 이 문제를 해결하려면 pip install 명령어에 --ignore-installed six 플래그를 추가하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-29(UTC)"],[],[],null,["# Troubleshoot authentication and authorization issues\n\nThis page describes some common issues that you might encounter involving\nauthentication and authorization.\n\n`This app isn't verified`\n-------------------------\n\nIf the OAuth consent screen displays the warning \"This app isn't verified,\" your\napp is requesting scopes that provide access to sensitive user data. If your\napplication uses sensitive scopes, your app must go through the\n[verification process](https://support.google.com/cloud/answer/7454865)\nto remove that warning and other limitations. During the development phase, you\ncan continue past this warning by selecting **Advanced \\\u003e Go to {Project Name}\n(unsafe)**.\n\n`File not found error for credentials.json`\n-------------------------------------------\n\nWhen running the code sample, you might receive a \"file not found\" or \"no such\nfile\" error message regarding credentials.json.\n\nThis error occurs when you have not authorized the desktop application\ncredentials. To learn how to create credentials\nfor a desktop application, go to\n[Create credentials](/workspace/guides/create-credentials#desktop-app).\n\nAfter you create the credentials, make sure the downloaded JSON file is saved as\n`credentials.json`. Then move the file to your working directory.\n\n`Token has been expired or revoked`\n-----------------------------------\n\nWhen running the code sample, you might receive a \"Token has been expired\" or\n\"Token has been revoked\" error message.\n\nThis error occurs when an access token from the Google Authorization Server has\neither expired or has been revoked. For information about potential causes\nand fixes, see\n[Refresh token expiration](/identity/protocols/oauth2#expiration).\n\nPython errors\n-------------\n\nThe following are some common Python errors.\n\n### `AttributeError: 'Module_six_moves_urllib_parse' object has no attribute 'urlparse'`\n\nThis error can occur in Mac OSX where the default installation of the `six`\nmodule (a dependency of the Python library) is loaded before the one that pip\ninstalled. To fix the issue, add pip's install location to the `PYTHONPATH`\nsystem environment variable:\n\n1. Determine pip's install location:\n\n ```\n pip show six | grep \"Location:\" | cut -d \" \" -f2\n ```\n\n Make a note of this location because it's needed for the next step.\n2. Add the following line to your `~/.bashrc` file, replacing\n \u003cvar translate=\"no\"\u003eINSTALL_PATH\u003c/var\u003e with the location determined from the\n previous step:\n\n ```\n export PYTHONPATH=$PYTHONPATH:INSTALL_PATH\n ```\n3. Reload your `~/.bashrc` file:\n\n ```\n source ~/.bashrc\n ```\n\n### `TypeError: sequence item 0: expected str instance, bytes found`\n\nThis error is due to a bug in `httplib2`. To resolve this problem, upgrade\nto the latest version of `httplib2`: \n\n pip install --upgrade httplib2\n\n### `Cannot uninstall 'six'`\n\nWhen running the `pip install` command, you might receive the following error: \n\n```\nCannot uninstall 'six'. It is a distutils installed project and thus we\ncannot accurately determine which files belong to it which would lead to\nonly a partial uninstall.\n```\n\nThis error occurs on Mac OSX when pip attempts to upgrade the pre-installed\n`six` package. To work around this issue, add the flag\n`--ignore-installed six` to the `pip install` command."]]