3월, 2022의 게시물 표시

[Colab] TypeError: Credentials need to be from either oauth2client or from google-auth.

1. Error 내용 /usr/local/lib/python3.7/dist-packages/gspread/utils.py in convert_credentials(credentials) 59 60 raise TypeError( ---> 61 'Credentials need to be from either oauth2client or from google-auth.' 62 ) 63   TypeError : Credentials need to be from either oauth2client or from google-auth.   2. 해결방안 # as-is # gauth.credentials = GoogleCredentials.get_application_default() # gc = gspread.authorize(gauth.credentials) # to-be #  from google.auth import default  # creds, _ = default() # gc = gspread.authorize(creds) <참고> https://colab.research.google.com/notebooks/snippets/sheets.ipynb https://github.com/burnash/gspread/issues/1014

[Python] AttributeError: 'str' object has no attribute 'loads'

  json.load 대신에 json.loads 사용함. <참고> http://daplus.net/python-attributeerror-str%EA%B0%9D%EC%B2%B4%EC%97%90%EB%8A%94-read%EC%86%8D%EC%84%B1%EC%9D%B4-%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4/

[Python] ImportError: symbol not found in flat namespace '_PQbackendPID'

  **  psycopg2 삭제 후  psycopg2-binary 로 설치하여 해결 > pip uninstall psycopg2 > pip install psycopg2-binary <참고> https://stackoverflow.com/questions/52770689/psycopg2-error-symbol-not-found-pqbackendpid